Sean P. DeNigris wrote:
I'm starting to put together some helpers for UI testing. What's out there already?
I started simulating keyboard events. It seems like the place to hook is ActiveHand>>handleEvent:. This way, it will take into account the keyboard focus and route the event the way it would for a real event. Does that sound right?
So far the API adds TestCase>>simulateKeyStrokes: which forwards to ActiveHand>>handleEvent:, so you can put in a test: testMyMorph MyMorph new openInWorld. "MyMorph takes the keyboard focus in #initialize" self simulateKeyStrokes: 'abcd'. "keystrokes go to MyMorph instance"
Obviously, there are things missing (like modifier keys), but what are your thoughts on the general approach?
Sean
-- View this message in context: http://forum.world.st/GUI-Testing-Library-tp4097866p4097866.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Perhaps an event recorder and replay could be added. This may be useful for instance if a regression GUI bug is introduced between Pharo versions that I encounter when driving the GUI. Then in the earlier version I could record the expected output of what I do in the GUI, then save that as a test to be loaded into the later version, and also attached to the issue tracker. just idle chatter and wild speculation. cheers, Ben