Bug 1584927 - [marionette] Handle user prompts in "Take Element Screenshot" and "Take Screenshot" commands. r=webdriver-reviewers,ato
authorHenrik Skupin <mail@hskupin.info>
Wed, 09 Oct 2019 09:43:13 +0000
changeset 496933 8d85038a038b2edb41ea3ec15d312ddf7ab6a2aa
parent 496932 e753d23c1237313b3cc94ee509cbba9a5b6246d8
child 496934 5921edc9bf59f2f48db37f63cf98c19cc439cd12
push id36671
push usershindli@mozilla.com
push dateWed, 09 Oct 2019 16:04:03 +0000
treeherdermozilla-central@0efb4f268d16 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswebdriver-reviewers, ato
bugs1584927
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1584927 - [marionette] Handle user prompts in "Take Element Screenshot" and "Take Screenshot" commands. r=webdriver-reviewers,ato Differential Revision: https://phabricator.services.mozilla.com/D48511
testing/marionette/driver.js
testing/web-platform/meta/webdriver/tests/take_element_screenshot/user_prompts.py.ini
testing/web-platform/meta/webdriver/tests/take_screenshot/user_prompts.py.ini
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -3014,16 +3014,17 @@ GeckoDriver.prototype.deleteSession = fu
  *
  * @return {string}
  *     If <var>hash</var> is false, PNG image encoded as Base64 encoded
  *     string.  If <var>hash</var> is true, hex digest of the SHA-256
  *     hash of the Base64 encoded string.
  */
 GeckoDriver.prototype.takeScreenshot = async function(cmd) {
   let win = assert.open(this.getCurrentWindow());
+  await this._handleUserPrompts();
 
   let { id, full, hash, scroll } = cmd.parameters;
   let format = hash ? capture.Format.Hash : capture.Format.Base64;
 
   full = typeof full == "undefined" ? true : full;
   scroll = typeof scroll == "undefined" ? true : scroll;
 
   let webEl = id ? WebElement.fromUUID(id, this.context) : null;
deleted file mode 100644
--- a/testing/web-platform/meta/webdriver/tests/take_element_screenshot/user_prompts.py.ini
+++ /dev/null
@@ -1,55 +0,0 @@
-[user_prompts.py]
-  [test_accept_and_notify[capabilities0-prompt-\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-prompt-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-confirm-False\]]
-    expected: FAIL
-
-  [test_default[alert-None\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-confirm-True\]]
-    expected: FAIL
-
-  [test_accept_and_notify[capabilities0-confirm-True\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-prompt\]]
-    expected: FAIL
-
-  [test_default[confirm-False\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-alert\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-confirm\]]
-    expected: FAIL
-
-  [test_accept_and_notify[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-prompt-None\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-prompt-\]]
-    expected: FAIL
-
-  [test_default[prompt-None\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-confirm-False\]]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/webdriver/tests/take_screenshot/user_prompts.py.ini
+++ /dev/null
@@ -1,55 +0,0 @@
-[user_prompts.py]
-  [test_accept_and_notify[capabilities0-prompt-\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-prompt-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss_and_notify[capabilities0-confirm-False\]]
-    expected: FAIL
-
-  [test_default[alert-None\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-confirm-True\]]
-    expected: FAIL
-
-  [test_accept_and_notify[capabilities0-confirm-True\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-prompt\]]
-    expected: FAIL
-
-  [test_default[confirm-False\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-alert\]]
-    expected: FAIL
-
-  [test_ignore[capabilities0-confirm\]]
-    expected: FAIL
-
-  [test_accept_and_notify[capabilities0-alert-None\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-prompt-None\]]
-    expected: FAIL
-
-  [test_accept[capabilities0-prompt-\]]
-    expected: FAIL
-
-  [test_default[prompt-None\]]
-    expected: FAIL
-
-  [test_dismiss[capabilities0-confirm-False\]]
-    expected: FAIL
-