New issue 197 by geoff.ba...@gmail.com: "Type Into Table Cell" keyword
holds down Enter key forever
http://code.google.com/p/robotframework-swinglibrary/issues/detail?id=197
We are using SwingLibrary 1.1.3, JVM 1.6.0.26 and RHEL5 Linux.
We have noticed that using the "Type Into Table Cell" keyword results in
the Enter key being pressed and never released, which can have some
unexpected effects... everything one does subsequently in a test is
essentially done with the Enter key held down.
I believe the reason for this is that Jemmy double clicks the cell, types
in the text, and then tries to press Enter. Unfortunately, it assumes that
the KEY_PRESSED and KEY_RELEASED events should be generated on the same
widget, whereas in the case of the table cell edit, the KEY_PRESSED event
causes editing to stop and the JTextField to go away. This means the
KEY_RELEASED event is never generated. (If you do this by hand, Swing emits
the KEY_RELEASED event on the JTable).
See the KeyEventDriver in Jemmy for the code I'm referring to here.
Comment #8 on issue 197 by janne.t....@gmail.com: "Type Into Table
Cell" keyword holds down Enter key forever
http://code.google.com/p/robotframework-swinglibrary/issues/detail?id=197
Fixed this by always generating the release event, as in the attached
testscript.
https://github.com/robotframework/SwingLibrary/commit/b0a62e342293eb89dad413d2d6465108537b3c43