Skip to content

Commit

Permalink
Update desired and required capabilities rather than replacing them i…
Browse files Browse the repository at this point in the history
…n the Python client
  • Loading branch information
davehunt committed Jun 20, 2016
1 parent 05e5799 commit 9e68025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ def start_session(self, desired_capabilities, browser_profile=None):
- javascript_enabled - Whether the new session should support JavaScript.
- browser_profile - A selenium.webdriver.firefox.firefox_profile.FirefoxProfile object. Only used if Firefox is requested.
"""
capabilities = {'desiredCapabilities': {}}
capabilities = {'desiredCapabilities': {}, 'requiredCapabilities': {}}
for k, v in desired_capabilities.items():
if k not in ('desiredCapabilities', 'requiredCapabilities'):
capabilities['desiredCapabilities'][k] = v
else:
capabilities[k] = v
capabilities[k].update(v)
if browser_profile:
capabilities['desiredCapabilities']['firefox_profile'] = browser_profile.encoded
response = self.execute(Command.NEW_SESSION, capabilities)
Expand Down

0 comments on commit 9e68025

Please sign in to comment.