Python RemoteConnection HTTPS connection
Meta -
OS: RedHat 7.2 - Docker (base image alpine:3.4) Selenium Version: version: '3.11.0', revision: 'e59cfb3' Browser: Firefox Browser Version: 52.4.0 (64-bit)
My Selenium hub is behind a reverse proxy serving an HTTPS connection. I have to deal with an internal PKI and custom CA certificates with my Python Selenium scripts. No settings are available in RemoteConnection class to handle certificates or to ignore an untrusted connection.
Expected Behavior -
class BaseTest(TestCots):
def setUp(self):
executor = RemoteConnection('https://myhome.com:4444/wd/hub', verify='ca.pem', resolve_ip=False)
self.driver = webdriver.Remote(
command_executor=executor,
desired_capabilities=DesiredCapabilities.FIREFOX)
Or completely disable the certificate verification:
executor = RemoteConnection('https://myhome.com:4444/wd/hub', verify=False, resolve_ip=False)
Actual Behavior -
There is no way in python-selenium for passing custom certificates inside the code.
I have already write a solution that I'll attach to this issue.
Since 3.14.0 and the urllib3 backend, situation is different, the default is to not validate certificates -which is a security issue, reported as https://github.com/SeleniumHQ/selenium/issues/6534 . There's still no way to provide our own certificate chain to verify against ( but a solution proposed in #6536 would allow that )
solution was merged so closing