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

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: remove getter, use variable directly. 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
« no previous file with comments | « chrome/test/chromedriver/capabilities.cc ('k') | chrome/test/chromedriver/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/client/chromedriver.py
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 7c075f009caa5b50a0693efce275bd5fd960a8ec..b90a59a75a84f5cb919a7cf62e9a321774e6bf67 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)
« no previous file with comments | « chrome/test/chromedriver/capabilities.cc ('k') | chrome/test/chromedriver/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698