MinkSelenium2Driver
MinkSelenium2Driver copied to clipboard
keyPress only working in Firefox
For some tests, I want to validate that the return keypress behaves correctly.
$field->keyPress(13)
The operation works in Firefox, but fails in every other browser I have tested with (Chrome, IE7, IE8, IE9).
@lphuberdeau , is this still an issue?
I may be several weeks behind the latest updates to Mink and all (but Selenium is up to date). This is still an issue.
Does other key*
methods, like keydown
and keyup
fail with same 13 char code? From the code it seems pure responsibility of underlying Syn library (http://bitovi.com/blog/2010/07/syn-a-standalone-synthetic-event-library.html), which is supposed to be cross-browser.
I guess we need to investigate that or consider using native event triggering code in WebDriver itself.
tested with keydown, keypress and keyup, including all of them in sequence. No luck.
Can you please add test case, that would:
- open a page in Chrome
- send ENTER key
- check (e.g. via js callback) that ENTER key was received properly
- add assertion that would check ENTER keypress result
I know that test would fail now, but once we figure out what's wrong we'll see instantly that it passes.
About the fix I see several options:
- it's a bug in Syn library that triggers the event and upgrading a library might solve a problem
- use native Selenium event triggering code, but ensure that JS event is fired where it should
In any case I would expect valid PR from you with a test and a fix.