Closed Bug 1486485 Opened 2 years ago Closed 2 years ago
"Send Alert Text" doesn't replace default user prompt value if text is an empty string
Because we only type when keys exist the default value will remain, and it is not possible to clear it. To make this possible the input field needs to be cleared first.
Here the WebDriver spec definition of setting the text: > Perform user agent dependent steps to set the value of current user prompt’s text field to text. As such internally Marionette uses `interaction.sendKeysToElement()` similar to the `Element Send Keys` command. Hereby the latter command doesn't replace the content, but concatenates the given `text` at the end.
The patch refactors the test file, and also adds an additional test, which makes sure that the default text of the prompt is replaced in case of an empty string is send as text.
Attachment #9004245 - Flags: review?(james)
Attachment #9004246 - Flags: review?(james)
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/f3ea8e988254 [marionette] Replace and not append text for "WebDriver:SendAlertText". r=jgraham https://hg.mozilla.org/integration/mozilla-inbound/rev/82dc592c7293 [wdspec] Add test for empty text to send_alert_text/send.py. r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12735 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.