Skip to content

Commit 3395766

Browse files
committed
py: test for existence of marionette key in capabilities
The existing key checked for strict boolean equivalence, but using surprising Python syntax (foo is True, rather than foo == True). This changes it to be a loose truthyness check as suggested by @Dude-x.
1 parent 9e8d764 commit 3395766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/firefox/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, firefox_profile=None, firefox_binary=None, timeout=30,
5353
capabilities = DesiredCapabilities.FIREFOX
5454

5555
# marionette
56-
if "marionette" in capabilities and capabilities["marionette"] is True:
56+
if capabilities.get("marionette"):
5757
if "binary" in capabilities:
5858
self.binary = capabilities["binary"]
5959
self.service = Service(executable_path, firefox_binary=self.binary)

0 commit comments

Comments
 (0)