webElement.sendKeys(Keys.chord(Keys.CONTROL, "a"), textToSend) is not working with geckodriver
Categories
(Testing :: geckodriver, defect)
Tracking
(Not tracked)
People
(Reporter: yashwanth.merugu, Unassigned)
References
()
Details
(Keywords: 64bit)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36
Steps to reproduce:
Once the driver is initialized with Geckodriver, navigate to the following URL's which contain input box with some default value. Here we need to clear the data in it and send text.
URL Scenario to clear and send text:
« https://stackoverflow.com/users/5081877/yash
« XPath{"//*[@id='search']/div/input"} and InputText{'mozilla'}
webElement.clear();
webElement.sendKeys(textToSend);
Working fine on clearing it is not getting any default value.But here in the following Scenario on clearing it get some default value we need to replace the text.
URL Scenario to replace text:
« https://stackoverflow.com/users/5081877/yash
« XPath{"//input[@id='loanamount']"} and InputText{"20,00,000"}
« XPath{"//input[@id='loaninterest']"} and InputText{"10"}
« XPath{"//input[@id='loanterm']"} and InputText{"15"}
//webElement.clear();
webElement.sendKeys(Keys.chord(Keys.CONTROL, "a"), textToSend); // Keys.COMMAND - MAC
Here the above code is working in old firefox browser but not working with GeckoDriver.
os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'.
browserName: firefox, browserVersion: 65.0, moz:geckodriverVersion: 0.24.0
Actual results:
Actual is it is selecting the text but not replacing.
Expected results:
It should replace the text.
URL Scenario to replace text: https://emicalculator.net/
Hi, Yashwanth, since you're reporting a Geckodriver issue, I moved the bug there. Priorities are set by the contributors who take on the bugs, so I unset that. Thanks for reporting this!
Comment 3•5 years ago
|
||
Please attach a trace log when running your test. Details in how to do it can be found here:
https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/TraceLogs.html
Also a short code snippet would be great.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
As identified on https://github.com/mozilla/geckodriver/issues/1502 the test uses Keys.chord()
which uses the NULL character to reset the pressed modifier key.
So this is dupe of bug 1494661.
Hi whimboo.
I have observed that you have duplicated the bug. Here i am not saying that "WebDriver:ElementSendKeys" has to support "NULL" key
it is different he is passing the null value. Where as i am passing value you can observe form the trace. Both Bugs are different from each other.
------------- sendKeys(null)
webdriver::server DEBUG -> POST /session/SESSION-ID/element/ELEMENT-ID/value {"id":"ELEMENT-ID","text":"null","value":["n","u","l","l"]}
Marionette DEBUG 0 -> [0,6,"WebDriver:ElementSendKeys",{"id":"ELEMENT-ID","text":"null","value":["n","u","l","l"]}]
Marionette DEBUG 0 <- [1,6,null,{"value":null}]
webdriver::server DEBUG <- 200 OK {"value":null}
------------- sendKeys(Keys.chord(Keys.META, "a"), "20,00,000")
webdriver::server DEBUG -> POST /session/SESSION-ID/element/ELEMENT-ID/value {"id":"ELEMENT-ID","text":"a20,00,000","value":["","a","","2","0",",","0","0",",","0","0","0"]}
Marionette DEBUG 0 -> [0,6,"WebDriver:ElementSendKeys",{"id":"ELEMENT-ID","text":"a20,00,000","value":["","a","","2","0",",","0","0",",","0","0","0"]}]
Marionette DEBUG 0 <- [1,6,null,{"value":null}]
webdriver::server DEBUG <- 200 OK {"value":null}
--------------- sendKeys(Keys.chord(Keys.META, "a"), null)
webdriver::server DEBUG -> POST /session/SESSION-ID/element/ELEMENT-ID/value {"id":"ELEMENT-ID","text":"anull","value":["","a","","n","u","l","l"]}
Marionette DEBUG 0 -> [0,10,"WebDriver:ElementSendKeys",{"id":"ELEMENT-ID","text":"anull","value":["","a","","n","u","l","l"]}]
Marionette DEBUG 0 <- [1,10,null,{"value":null}]
webdriver::server DEBUG <- 200 OK {"value":null}
Comment 6•5 years ago
|
||
No, this is a dupe. As I said Key.chords is using Keys.NULL
- which is NOT null
- to reset the modifier state. That is not supported right now due to bug 1494661.
Description
•