Fix for driver.getKeyboard().sendKeys() with the W3C protocol
See original GitHub issueIt is my understanding that, since the switch from JSONWP to the W3C protocol, the syntax driver.getKeyboard().sendKeys()
is not supported anymore, the reason being that the underlying command is not present in the W3C specification. Can somebody please help answer these two questions:
- What is the recommended way to accomplish the same functionality with the latest version of Appium?
- Should the
driver.getKeyboard().sendKeys()
API be removed from all language bindings? My stance on this is that we should get thedriver.getKeyboard().sendKeys()
syntax working again through a workaround implemented in either language bindings or Appium code, but I am not familiar with the Appium internals and I might be wrong.
Any qualified opinion and advice on this issue is highly appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
webdriverio/webdriverio - Gitter
It's not working, due to keyboard enabled here- i faced same issue in appium/java also and resolve using this- driver.getKeyboard().sendKeys("jschwartz") ...
Read more >Solution for sendkeys(CharSequence) in Selenium
If SendKeys is not working in Selenium webdriver or any error related to sendKeys (CharSequence) from the type Webelement then it will help....
Read more >Send Keys - Appium
Description. Any UTF-8 character may be specified, however, if the server does not support native key events, it should simulate key strokes for...
Read more >How to resolve this error Element not interactable Any solution
findElement(By.xpath("//span[contains(text(),'SeleniumHQ Browser ... ProtocolHandshake createSession INFO: Detected dialect: W3C Exception ...
Read more >What's New in Appium Java Client 8.0.0 - Applitools
WebDriver Protocol Compliance. With Appium 2.0, we on the Appium team are making sure we are strictly W3C compliant. · Driver-Specific Options ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Warren25 This works if you can come up with a locator for the element. However, in cases where you can’t (e.g. some type of dynamically composed UI), you can’t get a reference to the element. However, if you can somehow figure out the coordinates of the element relative to some other element that you are able to locate, then you can tap the element to bring it in focus. This is where the
driver.getKeyboard().sendKeys()
would have been useful, if it worked, so you can type in the curently focused element.I didn’t get to try the method suggested by @mykola-mokhnach, but it sounds like it should work. It’s weird that
driver.switchTo().activeElement()
returns a WebElement and not a MobileElement, but that’s hopefully not a problem.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.