if not found image skip to --- use exists() instead of find()
I'm using sikuli to book into gym classes online for my work colleagues. I have the basic functionality working, but one of the flaws about the log in process is that if someone logs in to check their details and doesnt log out, the script to log in bugs out and the whole process fails. Therefore I need it to check on the first page it goes to, if LOG OUT is an option.
I found a similar question on this and tried the solution but i get a Cannot find img error before it even gets to the if.
img = ( LOGOUT)
if find(LOGOUT ):
click( logout )
wait(2)
type(accountan
wait(2)
else:
type(accountan
wait(2)
bugs out on first line. Causing me headache.
any ideas? and what would I have to do to make it look for one of 2 pictures, like logout or page is currently unavailable?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask T for more information if necessary.