New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悰 Bug]: RemoteConnection.set_certificate_bundle_path set as None does NOT work #13931
Comments
@Lhtyyy, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Hi, @Lhtyyy. Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue. Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough. Reply to this issue when all information is provided, thank you. |
reproduce step:
the key.pkcs8 and cert.pem ref to info security
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.remote.remote_connection import RemoteConnection
def remote_driver():
options = Options()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
RemoteConnection.set_certificate_bundle_path(None)
print('to connect remote')
driver = webdriver.Remote('https://sessions.grid.com', options=options)
print('to open url')
driver.get('https://cn.bing.com/')
print(driver.title)
driver.quit()
if __name__ == '__main__':
remote_driver() BUT get below error:
python 3.12 |
This is not doing anything because you are not modifying the object used to create the remote connection. You can follow this SO answer and adapt it to 4.20. |
馃挰 Please ask questions at:
|
Hi, @diemol thanks for reply, and there is a note at urllibs:
so in py/selenium/webdriver/remote/remote_connection.py#L235, if self._ca_certs is None, it will be still CERT_REQUIRED below is the new test code: import certifi
import urllib3
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.remote.remote_connection import RemoteConnection
def remote_driver():
print(certifi.where())
options = Options()
# required
options.add_argument('--headless')
options.add_argument('--no-sandbox')
hub_url = r'https://sessions.grid.com'
rc = RemoteConnection(hub_url, keep_alive=False, ignore_proxy=False)
# rc.set_certificate_bundle_path(r'S:\github\pythonProject\web-auto\data\cert.pem')
rc.set_certificate_bundle_path(None)
print('to connect remote')
driver = webdriver.Remote(rc, options=options, keep_alive=False)
print('to open url')
driver.get('https://cn.bing.com/')
print(driver.title)
driver.quit()
if __name__ == '__main__':
remote_driver() console output
|
What happened?
RemoteConnection.set_certificate_bundle_path(None)
but still request cert verify
if add
in venv/Lib/site-packages/selenium/webdriver/remote/remote_connection.py before line
it will work
How can we reproduce the issue?
Relevant log output
Operating System
Windows 11
Selenium version
python selenium 4.19.0
What are the browser(s) and version(s) where you see this issue?
.
What are the browser driver(s) and version(s) where you see this issue?
.
Are you using Selenium Grid?
selenium-server-4.19.0.jar
The text was updated successfully, but these errors were encountered: