Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Selenium2Library/keywords/_browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def _create_remote_web_driver(self , capabilities_type , remote_url , desired_ca
'''parses the string based desired_capabilities if neccessary and
creates the associated remote web driver'''

desired_capabilities_object = capabilities_type
desired_capabilities_object = capabilities_type.copy()

if type(desired_capabilities) in (str, unicode):
desired_capabilities = self._parse_capabilities_string(desired_capabilities)
Expand Down
6 changes: 6 additions & 0 deletions test/unit/keywords/test_browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ def test_create_remote_browser_with_string_desired_prefs(self):
self.verify_browser(webdriver.Remote, "chrome", remote="http://127.0.0.1/wd/hub",
desired_capabilities=expected_caps)

def test_capabilities_attribute_not_modified(self):
expected_caps = {"some_cap":"42"}
self.verify_browser(webdriver.Remote, "chrome", remote="http://127.0.0.1/wd/hub",
desired_capabilities=expected_caps)
self.assertFalse("some_cap" in webdriver.DesiredCapabilities.CHROME)

def test_set_selenium_timeout_only_affects_open_browsers(self):
bm = _BrowserManagementKeywords()
first_browser, second_browser = mock(), mock()
Expand Down