← Back to team overview

sikuli-driver team mailing list archive

[Question #189092]: A Simple Region.onChange request

 

New question #189092 on Sikuli:
https://answers.launchpad.net/sikuli/+question/189092

Firstly still somewhat a beginner with sikuli and python so please bear with me.
I am writing automation tests for a flash app and i simple want to print a message every time i navigate a menu and the menu icon differs from the one before, this is what i have and have tried a few different things but they either tell me that what i am trying to call isn't defined or it just observes and doesn't perform the rest of the script, the example below runs and passes the test but it does not seem to call my defined event as nothing is printed to the test results...please help....

def test_exampleTest(self):
        nav = Region(Region(569,809,144,36))
        nav.observe() 
        def changeHandler(event):print"work ya bastard"
        nav.onChange(5,changeHandler)
        type(Key.DOWN)
        wait(1)
        type(Key.RIGHT)
        wait(1)
        type(Key.RIGHT)
        wait(1)
        type(Key.RIGHT)
        wait(1)



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.