Click buttons until there are none OR click away error prompt

Asked by Nick

I'd like to click the same button over and over again until it goes away (and sometimes) click ok if/ when an error message comes up, preventing the original button from being clicked...

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

Hi,

You can try something like that:

while True:
   wait(1) # Give some time for each button to appear
   if exists("button.png"):
      click("button.png")
   elif exists("OKButton.png"):
      click("OKButton.png")
   else:
      break

Can you help with this problem?

Provide an answer of your own, or ask Nick for more information if necessary.

To post a message you must log in.