Skip to content

Commit 1db5d56

Browse files
committed
[py] allow firefox sessions to toggle off acceptInsecureCerts
capabilities and options both default to True so options always overridden fixes #10442
1 parent 7ad872e commit 1db5d56

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎py/selenium/webdriver/firefox/webdriver.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,8 @@ def __init__(self, firefox_profile=None, firefox_binary=None,
161161
self.profile = firefox_profile
162162
options.profile = firefox_profile
163163

164-
# TODO: Remove when we remove capabilities code. Firefox
165-
# is being strict here, like it should. When we can remove capabilities
166-
# for options this will be good to be deleted.
167-
if capabilities.get("acceptInsecureCerts"):
168-
options.accept_insecure_certs = capabilities.get("acceptInsecureCerts")
164+
if not capabilities.get("acceptInsecureCerts") or not options.accept_insecure_certs:
165+
options.accept_insecure_certs = False
169166

170167
if not self.service:
171168
self.service = Service(

0 commit comments

Comments
 (0)