Closed GoogleCodeExporter closed 9 years ago
How do you actually observe this behavior?
We could probably implement functionality similar to
JTableMouseDriver.editCell, but so that we generate pressKey and releaseKey on
the textfield and table, respectively.
Can you Geoff implement a minimal test case to verify the correct behavior?
Original comment by janne.t....@gmail.com
on 23 Aug 2011 at 12:01
One effect I have noticed is that the edit (as in the TableModel being updated
rather than the edit component going away) does not in fact take place until
some time afterwards, which can lead to synchronisation issues if the test
concerned assumes the change has been processed in the model and tries to
proceed when it hasn't. If the Enter key is released this does not happen.
Another effect has been to screw up how our recorder manages things internally.
Because we keep track of key presses so we can figure out what semantic events
have been caused by each other, it's very difficult to do this if a key is
never released.
By "test case" do you mean a formal test case written with JUnit, or is a
Python example (like the ones I attached in my other bugs) that prints stuff
sufficient?
Original comment by geoff.ba...@gmail.com
on 23 Aug 2011 at 12:24
OK, it was fairly easy to add an example demonstrating the first effect. The
test script edits a cell and then prints the value in the table model
afterwards. If you give it an argument it will generate its own KEY_RELEASE. As
you can see the edit is not completed in the first, basic case.
$ env CLASSPATH=swinglibrary-1.1.3.jar jython testscript.py
Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer
unchanged
$ env CLASSPATH=swinglibrary-1.1.3.jar jython testscript.py release
Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer
changed
It's also fairly easy to add an AWTEventListener and verify that the Enter key
is never released in the first case.
Original comment by geoff.ba...@gmail.com
on 23 Aug 2011 at 6:59
Attachments:
Thanks for the scripts, I will take a look whether this could be fixed without
having to patch Jemmy.
Original comment by janne.t....@gmail.com
on 24 Aug 2011 at 11:04
Original comment by janne.t....@gmail.com
on 24 Aug 2011 at 11:20
These issue are not going to be included in 1.2
Original comment by janne.t....@gmail.com
on 13 Sep 2011 at 10:06
Original comment by janne.t....@gmail.com
on 13 Sep 2011 at 10:07
Fixed this by always generating the release event, as in the attached
testscript.
https://github.com/robotframework/SwingLibrary/commit/b0a62e342293eb89dad413d2d6
465108537b3c43
Original comment by janne.t....@gmail.com
on 24 Apr 2012 at 8:20
Original comment by janne.t....@gmail.com
on 4 May 2012 at 10:39
Original comment by janne.t....@gmail.com
on 4 May 2012 at 10:40
Original issue reported on code.google.com by
geoff.ba...@gmail.com
on 22 Aug 2011 at 1:59