Skip to content

Commit

Permalink
Add back the ability to set profile when using Firefox 45ESR. Fixes S…
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Apr 25, 2017
1 parent 8f325df commit 41d9d32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def start_session(self, capabilities, browser_profile=None):
raise InvalidArgumentException("Capabilities must be a dictionary")
w3c_caps = {"firstMatch": [], "alwaysMatch": {}}
if browser_profile:
capabilities["moz:firefoxOptions"]["profile"] = browser_profile.encoded
if "moz:firefoxOptions" in capabilities:
capabilities["moz:firefoxOptions"]["profile"] = browser_profile.encoded
else:
capabilities['desiredCapabilities'] = {'firefox_profile': browser_profile.encoded}
w3c_caps["alwaysMatch"].update(capabilities)
parameters = {"capabilities": w3c_caps,
"desiredCapabilities": capabilities}
Expand Down

0 comments on commit 41d9d32

Please sign in to comment.