Bug 1486485 - [marionette] Replace and not append text for "WebDriver:SendAlertText". r=jgraham
authorHenrik Skupin <mail@hskupin.info>
Mon, 27 Aug 2018 17:37:20 +0200
changeset 491655 f3ea8e9882548d737572d4c7a5a8d72518bf7183
parent 491654 0dba07112ba9a40cd6a6e0996faf567b3e4fbb71
child 491656 82dc592c7293290a7b17c4473c01a228e42615cd
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1486485
milestone63.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 1486485 - [marionette] Replace and not append text for "WebDriver:SendAlertText". r=jgraham
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -3202,16 +3202,18 @@ GeckoDriver.prototype.getTextFromDialog 
  *     confirm, or a prompt.
  */
 GeckoDriver.prototype.sendKeysToDialog = async function(cmd) {
   assert.open(this.getCurrentWindow());
   this._checkIfAlertIsPresent();
 
   // see toolkit/components/prompts/content/commonDialog.js
   let {loginTextbox} = this.dialog.ui;
+  loginTextbox.value = "";
+
   await interaction.sendKeysToElement(
       loginTextbox, cmd.parameters.text, this.a11yChecks);
 };
 
 GeckoDriver.prototype._checkIfAlertIsPresent = function() {
   if (!this.dialog || !this.dialog.ui) {
     throw new NoSuchAlertError();
   }