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

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

Issue 1827003004: [Chromedriver] Chromedriver should handle unexpected alert automatically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make ignore value as default & fix nits. Created 4 years, 1 month 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 979da9eca3e662990a4156173541df8e021b7ed2..e7e1d87fb328ca5d0972a0d4a94b1ad89812c0ed 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -111,7 +111,7 @@ class ChromeDriver(object):
mobile_emulation=None, experimental_options=None,
download_dir=None, network_connection=None,
send_w3c_capability=None, send_w3c_request=None,
- page_load_strategy=None):
+ page_load_strategy=None, unexpected_alert_behaviour=None):
self._executor = command_executor.CommandExecutor(server_url)
options = {}
@@ -190,6 +190,11 @@ class ChromeDriver(object):
assert type(page_load_strategy) is str
params['desiredCapabilities']['pageLoadStrategy'] = page_load_strategy
+ if unexpected_alert_behaviour:
+ assert type(unexpected_alert_behaviour) is str
+ params['desiredCapabilities']['unexpectedAlertBehaviour'] = (
+ unexpected_alert_behaviour)
+
if network_connection:
params['desiredCapabilities']['networkConnectionEnabled'] = (
network_connection)

Powered by Google App Engine
This is Rietveld 408576698