Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current "key*" methods are just emulating JS events #139

Open
aik099 opened this issue May 7, 2014 · 4 comments
Open

Current "key*" methods are just emulating JS events #139

aik099 opened this issue May 7, 2014 · 4 comments
Labels

Comments

@aik099
Copy link
Member

aik099 commented May 7, 2014

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.

@aik099
Copy link
Member Author

aik099 commented May 7, 2014

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).

@stof
Copy link
Member

stof commented Jan 4, 2017

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

@aik099
Copy link
Member Author

aik099 commented Jan 4, 2017

Then we'll just update keyDown and keyUp methods we have to use WebDriver API and keep keyPress method intact.

@usmonster
Copy link

Hello! What's the status of this? It's very much needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants