Skip to content

Commit 677618b

Browse files
davehuntAutomatedTester
authored andcommitted
Add Firefox options to capabilities
When the firefox_options argument is not provided we generate a FirefoxOptions object, but due to some broken logic we weren't updating the capabilities from these options.
1 parent 3527d67 commit 677618b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

py/selenium/webdriver/firefox/webdriver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def __init__(self, firefox_profile=None, firefox_binary=None, timeout=30,
6666
firefox_options = Options()
6767
firefox_options.binary_location = self.binary if isinstance(self.binary, basestring) else self.binary._get_firefox_start_cmd()
6868
firefox_options.profile = self.profile
69+
70+
if capabilities is None:
71+
capabilities = firefox_options.to_capabilities()
6972
else:
70-
if capabilities is None:
71-
capabilities = firefox_options.to_capabilities()
72-
else:
73-
capabilities.update(firefox_options.to_capabilities())
73+
capabilities.update(firefox_options.to_capabilities())
7474

7575
# marionette
7676
if capabilities.get("marionette"):

0 commit comments

Comments
 (0)