Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4745)

Unified Diff: chrome/test/chromedriver/client/chromedriver.py

Issue 2776313003: Update ChromeDriver to accept W3C format InitSession (Closed)
Patch Set: Require chromeOptions.w3c to turn on w3c mode Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/client/chromedriver.py
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 3ef916190ba0962dcd180bf40d0b18a0f61781d9..acde88ef3820790c9b048ec0e36df637f6984538 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -184,27 +184,25 @@ class ChromeDriver(object):
options['w3c'] = send_w3c_capability
params = {
- 'desiredCapabilities': {
'chromeOptions': options,
'loggingPrefs': logging_prefs
- }
}
if page_load_strategy:
assert type(page_load_strategy) is str
- params['desiredCapabilities']['pageLoadStrategy'] = page_load_strategy
+ params['pageLoadStrategy'] = page_load_strategy
if unexpected_alert_behaviour:
assert type(unexpected_alert_behaviour) is str
- params['desiredCapabilities']['unexpectedAlertBehaviour'] = (
- unexpected_alert_behaviour)
+ params['unexpectedAlertBehaviour'] = unexpected_alert_behaviour
if network_connection:
- params['desiredCapabilities']['networkConnectionEnabled'] = (
- network_connection)
+ params['networkConnectionEnabled'] = network_connection
if send_w3c_request:
- params = {'capabilities': params}
+ params = {'capabilities': {'alwaysMatch': params}}
+ else:
+ params = {'desiredCapabilities': params}
response = self._ExecuteCommand(Command.NEW_SESSION, params)
if isinstance(response['status'], basestring):
« no previous file with comments | « no previous file | chrome/test/chromedriver/session_commands.cc » ('j') | chrome/test/chromedriver/session_commands.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698