Closed edno closed 8 years ago
Here's an example payload that the python bindings send when connecting directly with FirefoxDriver:
http://127.0.0.1:50783/hub/session/8b99b3d0-6456-df4b-8341-9806d28f9e69/element/{ecf9cf26-79a4-bd46-8d7c-25c8905f4959}/value
{"sessionId": "8b99b3d0-6456-df4b-8341-9806d28f9e69", "id": "{ecf9cf26-79a4-bd46-8d7c-25c8905f4959}", "value": ["s", "h", "o", "e", "s"]}
We currently only support using one of our language bindings provided: java / .NET / python / ruby / nodejs If you can reproduce the issue with one of those we'd be much more inclined to look into a potential send_keys bug with the driver implementation. Otherwise if you're writing your own client, I highly recommend looking at one of the ones we do maintain to compare with your own.
Also it would appear that you are attempting to use strictly the W3C protocol... which is not implemented in the Selenium project's FirefoxDriver. You might have better luck trying against marionette from Mozilla instead?
Thanks for the quick reply. You're right, I'm following the W3C reference just because that's what is recommended on the wiki 😥 I'm not familiar with Marionette but I'll have a look at it.
The Selenium wiki documents the legacy protocol. For the W3C protocol, stick to the actual spec.
Meta -
OS: Mac OS X 10.11.4 x86_64 Selenium Version: v2.53.0, with Core v2.53.0. Built from revision 35ae25b Browser: Firefox Browser Version: 46.0.1 (64-bit)
Expected Behavior -
The command sendKeys should populate the targeted field with keys from the string passed in parameter. Reference W3C WebDriver
Actual Behavior -
The command sendKeys terminates with an error, without sending the keys to the browser.
The server debug logs does not provide any relevant information:
18:46:55.766 DEBUG [15] org.openqa.selenium.remote.server.DriverServlet - Handling: POST /session/b3ae7d05-176c-4479-b67e-faf7e1e0204b/element/0/sendKeys 18:46:55.766 DEBUG [15] org.openqa.selenium.remote.server.DriverServlet - Error on: POST /session/b3ae7d05-176c-4479-b67e-faf7e1e0204b/element/0/sendKeys
Steps to reproduce -
Using REST client (e.g. Postman for Chrome), setup a new session and send keys to an input field:
http://127.0.0.1:4444/wd/hub/session/:sessionId:/element/0/sendKeys
{ "value": "shoes" }
I have tested using "text" instead of "value" as a parameter, also tested using array char instead of string.