Closed Bug 1433422 Opened 6 years ago Closed 6 years ago

WebDriver:ElementSendKeys does not append to a textual form control with existing value

Categories

(Remote Protocol :: Marionette, defect)

60 Branch
defect
Not set
normal

Tracking

(firefox-esr52 unaffected, firefox58 unaffected, firefox59 fixed, firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- fixed
firefox60 --- fixed

People

(Reporter: barancev, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(4 files, 4 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce:

Firefox Nightly 60.0a1 (2018-01-26) (64-bit)
Regression issue, yesterday's Nigtly was OK.

WebDriver driver = new FirefoxDriver();
driver.get("https://output.jsbin.com/neserun");
WebElement input = driver.findElement(By.name("test"));
assertEquals("test", input.getAttribute("value"));
input.sendKeys("123");
assertEquals("test123", input.getAttribute("value"));

it fails with

Expected: test123
Actual:     123test


Actual results:

The text should be appended to the existing value.


Expected results:

It is added in the beginning instead.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
This is a regression from bug 1432864
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(ato)
Resolution: DUPLICATE → ---
Flags: needinfo?(ato)
Assignee: nobody → ato
Blocks: webdriver
No longer blocks: 1432864
Depends on: 1432864
Summary: sendKeys should append text in an input with existing value → WebDriver:ElementSendKeys does not append to a textual form control with existing value
Comment on attachment 8945811 [details]
Bug 1433422 - Show full pytest failure logs.

https://reviewboard.mozilla.org/r/215904/#review221724

I guess I worry it coudl produce too much output for expected failures, but we could try this and see how it goes.
Attachment #8945811 - Flags: review?(james) → review+
Comment on attachment 8945812 [details]
Bug 1433422 - Move caret after focussing element.

https://reviewboard.mozilla.org/r/215906/#review221954
Attachment #8945812 - Flags: review?(dburns) → review+
Comment on attachment 8945813 [details]
Bug 1433422 - Fix interaction.moveCaretToEnd element conditions.

https://reviewboard.mozilla.org/r/215908/#review221956
Attachment #8945813 - Flags: review?(dburns) → review+
Comment on attachment 8945814 [details]
Bug 1433422 - Add basic form control tests for Element Send Keys.

https://reviewboard.mozilla.org/r/215910/#review221958
Attachment #8945814 - Flags: review?(dburns) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e87115ab4b57
Show full pytest failure logs. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/1b0a57e45822
Move caret after focussing element. r=automatedtester
https://hg.mozilla.org/integration/autoland/rev/af46ced494e8
Fix interaction.moveCaretToEnd element conditions. r=automatedtester
https://hg.mozilla.org/integration/autoland/rev/09304fa512bd
Add basic form control tests for Element Send Keys. r=automatedtester
Whiteboard: checkin-needed-beta
Whiteboard: checkin-needed-beta → [checkin-needed-beta]
This patch doesn’t apply cleanly to beta.
Flags: needinfo?(ato)
Whiteboard: [checkin-needed-beta]
pytest truncates long lists when printing a failed assertion.
This is not great for debugging and arguably it should be the
default to show the full diff when comparing lists.

MozReview-Commit-ID: L8vxIMM9g6m
Focussing the element changes the selection range.

MozReview-Commit-ID: JW68aZupkly
Bug 1432864 introduced a regression where the element conditions
for moving the caret to the end of the textual input were wrong.
Apparently if conditions are hard.

MozReview-Commit-ID: KlRv6sCroXW
We are apparently missing even the most basic tests for Element
Send Keys.  This is a moderate contribution.

MozReview-Commit-ID: 9uWtTJ7MFZx
Attachment #8945811 - Attachment is obsolete: true
Attachment #8945812 - Attachment is obsolete: true
Attachment #8945813 - Attachment is obsolete: true
Attachment #8945814 - Attachment is obsolete: true
Sheriffs: Please uplift this to beta.  It should now apply cleanly.
Flags: needinfo?(ato)
Whiteboard: [checkin-needed-beta]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: