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.

Reply via email to