← Back to team overview

sikuli-driver team mailing list archive

[Question #246342]: Do onAppear and observe work? [1.0.1]

 

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

Hello everyone. I've discovered this fantastic tool 3 weeks ago and I'm testing it on Windows 8.1 and OSX 10.7.5. I could have used almost every function but onAppear/observe. I've followed a few examples I've found and works according to the authors but they haven't worked for me.

What I want it's very simple. I'm testing an app that sometimes popups an error randomly. I want my script runs normally but when the error happens the script must click on accept button.

region_error = find(img.png).below(300)

def error_solution(event):
    region_error.click(button.png)
    region_error.stopObserver()

region_error.onAppear(img.png, error_solution)

region_error.observe(background=True)

Any ideas or is it a bug?

Thank you for your answers.

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