Open aik099 opened 10 years ago
For keyup
and keydown
events: http://stackoverflow.com/questions/11388327/how-to-write-a-keydown-and-keyup-for-webdriver .
For keypress
event: http://grokbase.com/t/gg/webdriver/1261z3gp5n/key-press-for-sequence-keys-not-working-in-firefox (seems like Ctrl+ENTER does trigger it, not sure about Mac).
keyup and keydown are hard to use right, because they are low-level actions, and must be applied in an order matching the behavior of a user action.
Btw, the W3C webdriver spec defines only 2 actions: keyDown
and keyUp
. There is a no keypress action here (browsers may trigger a keypress
event when processing a keyDown
action, if they dispatch such an event in normal usage, but it is not a separate action.
So I don't know whether these methods are really usable as is in the Mink API
Then we'll just update keyDown
and keyUp
methods we have to use WebDriver API and keep keyPress
method intact.
Hello! What's the status of this? It's very much needed.
Current "key*" methods are just emulating JS events instead of actually pressing corresponding keys. I recommend using dedicated WebDriver calls for that instead.
Though we need to add test to Mink to ensure that fired JS events are still fired as they should.