← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #190146]: Is there a way to check for a particular pop-up in the background throughout the script

 

Question #190146 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/190146

    Status: Answered => Open

sujeet is still having a problem:
I appreciate your response RaiMan. But I am still struggling. .Please
see the below example & let me know if i am wrong anywhere.

def Action:
      click("OK")

SearchRegion = (10,20,30,40) # some region
SearchRegion.OnAppear(errorimg.png , Action) # The handler to click OK
SearchRegion.observe(FOREVER, background = True)

while exists("xyz.png"):
      (do a set of operations)
while exists("abc.png"):
      (do a set of operations)
....                  # the script will continue for other workflow.

But in the above work flow if that "errorimg.png " appears somewhere
when the script finds "xyz.png" , my script is not doing the  "Action"
task.(to click "OK")

Please reply with sample code for this scenario .

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