← Back to team overview

sikuli-driver team mailing list archive

[Question #292741]: Event hadling doesnot loop

 

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

Hello Raiman,
I am Shivakumar, I am new to this Forum and Sikuli.
I am trying to use the Event handler and it seems to work in a differnt way, below is what I am trying to do.
The objective is before I start a new test I would like to Close all the Errors and warning window that are visible on the application Screen.

#this defination is to click on the error or the warning Icon and hit enter to Close it, I use hit enter as it is the OK button always that is selected by Default.

def clickenter(errororwarning):
    print errororwarning
    print "entering def"
    if exists(errororwarning):
        print "found"
        click(errororwarning)
        wait(1)
        type(Key.ENTER)
        wait(1)
               
        
 #on appear of the error, I call the defination clickenter with a Parameter of error image 
 onAppear(imagelibrary.ERROR, clickenter(magelibrary.ERROR))

 #on appear of the error, I call the defination clickenter with a Parameter of warning image 
onAppear(magelibrary.Warning, clickenter(magelibrary.Warning))

#Keep a Observation for 10 seconds
observe(10)

The Problem that happens is I have a 2 to 3 warning Images, with the above code it only calls the def ones and Close only the first warning popup window, after the Close there is another warning window but it doesnot go in the def again, isnt it the "observe" should Keep Looping for 10 seconds ? or Am I doing some thing wrong.?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.