Skip to content

Commit

Permalink
[py] Removed desired capabilities from handshake code (#10494)
Browse files Browse the repository at this point in the history
* [py] Removed desired capabilities from handshake code

Fixes #10264

Co-authored-by: David Burns <[email protected]>
  • Loading branch information
SinghHrmn and AutomatedTester authored Apr 6, 2022
1 parent dad6f8c commit 482d5a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ def start_session(self, capabilities: dict, browser_profile=None) -> None:
else:
capabilities.update({'firefox_profile': browser_profile.encoded})
w3c_caps = _make_w3c_caps(capabilities)
parameters = {"capabilities": w3c_caps,
"desiredCapabilities": capabilities}
parameters = {"capabilities": w3c_caps}
response = self.execute(Command.NEW_SESSION, parameters)
if 'sessionId' not in response:
response = response['value']
Expand Down
6 changes: 2 additions & 4 deletions py/test/unit/selenium/webdriver/remote/new_session_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def test_converts_oss_capabilities_to_w3c(mocker):
oss_caps = {'platform': 'WINDOWS', 'version': '11', 'acceptSslCerts': True}
w3c_caps = {'platformName': 'windows', 'browserVersion': '11', 'acceptInsecureCerts': True}
WebDriver(desired_capabilities=deepcopy(oss_caps))
expected_params = {'capabilities': {'firstMatch': [{}], 'alwaysMatch': w3c_caps},
'desiredCapabilities': oss_caps}
expected_params = {'capabilities': {'firstMatch': [{}], 'alwaysMatch': w3c_caps}}
mock.assert_called_with(Command.NEW_SESSION, expected_params)


Expand All @@ -42,8 +41,7 @@ def test_converts_proxy_type_value_to_lowercase_for_w3c(mocker):
oss_caps = {'proxy': {'proxyType': 'MANUAL', 'httpProxy': 'foo'}}
w3c_caps = {'proxy': {'proxyType': 'manual', 'httpProxy': 'foo'}}
WebDriver(desired_capabilities=deepcopy(oss_caps))
expected_params = {'capabilities': {'firstMatch': [{}], 'alwaysMatch': w3c_caps},
'desiredCapabilities': oss_caps}
expected_params = {'capabilities': {'firstMatch': [{}], 'alwaysMatch': w3c_caps}}
mock.assert_called_with(Command.NEW_SESSION, expected_params)


Expand Down

0 comments on commit 482d5a4

Please sign in to comment.