SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Opera 11.5 synthetic keypress events exhibit flaky failures #3068

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 3068

I discovered a regression in Opera between versions 10 and 11.5 in synthetic keypress
event firing and filed it as Opera bug DSK-353459. Details on the bug below. The bug
is such that it makes synthetic typing on Opera very unreliable. I am filing this bug
to track the issue, and follow it until we see a new release from Opera that includes
a bug fix.

Details filed to Opera on bug DSK-353459:

Summary: synthetic keypress events exhibit flaky failures

Steps to reproduce
===================
1. Create an HTML file with this content:

<!DOCTYPE html>
<html>
<body>
<div id="input"></div>
<script type="text/javascript">
var maxPresses = 1000;
var input = document.getElementById('input');
var numPresses;

for (numPresses = 0; numPresses < maxPresses; numPresses++) {
var event = document.createEvent('Events');
event.initEvent('keypress', true, true);
var pressed = input.dispatchEvent(event);
if (!pressed) {
alert('failed after ' + numPresses + ' presses');
break;
}
}

if (numPresses == maxPresses) {
alert('passed');
}
</script>
</html>

2. Reload the page multiple times and see that it fails at an arbitrary point on each
load.

Expected result
===============
As in all other browsers, all keypress events should succeed. (Note that the given
test cannot be used in IE8 or earlier or IE9 quirks mode, because they do not support
the W3C event creation API.)

Additional notes
===============
This problem is specific to the 'keypress' event. Changing it to 'keyup' or 'keydown',
for example, makes the problem go away. Also, this a regression from version 10.63,
which does not exhibit the issue.

Reported by gdennis@google.com on 2011-12-16 02:22:06

lukeis commented 8 years ago
Just to clarify: this won't impact anyone using the OperaDriver, but will hit anyone
using the atoms library for typing (i.e., Selenium)

Reported by jmleyba on 2011-12-18 01:12:27

lukeis commented 8 years ago

Reported by barancev on 2011-12-26 07:00:33

lukeis commented 8 years ago
@barancev This is not a WebDriver bug.  It's already correctly labeled.

Reported by jmleyba on 2011-12-27 17:05:19

lukeis commented 8 years ago
Is this issue still actual?

Reported by barancev on 2013-11-02 17:24:46

lukeis commented 8 years ago
Well, it's still a problem with Opera 11.5, but it was fixed by Opera in Opera 12. We
(Google) only use Opera 12 now, so it's not a practical issue for us, and as far as
I know, Opera will never backport the fix to Opera 11.5. I recommend this issue be
closed as "WontFix".

Reported by gdennis@google.com on 2013-11-02 17:30:17

lukeis commented 8 years ago
OK, got it.

Reported by barancev on 2013-11-02 19:13:46

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:14:23