If image not found start with new number

Asked by maitrey

If image (1460481116500-3.png) not found after popup program should start with new search given in myListFixed.
What should i do in that case. I am new to sikulli....

myListFixed = ("8185018*","8185017*","8185015G002*","8185015G001*")
for entry in myListFixed:

    click("1460480458427-1.png")
    wait(2)
    click("1460483907030.png")
    wait(1)
    type(Key.TAB)
    type(Key.TAB)
    type(Key.TAB)
    wait(1)
    type( entry + Key.ENTER)
    wait(2)
    while not exists("1460481116500-3.png"):
        popup("Check Maitrey something wrong")

    click("1460481352717-1.png")
    wait(3)
    hover("1460552942857.png")
    click("1460552942857-1.png")
    hover("1460553160240-3.png")
    wait(1)
    click("1460553160240-4.png")
    hover("1460481772726-2.png")
    click("1460481781269-1.png")
    wait(9)
    wait("1460483715075-1.png",150)
    click("1460483810493-4.png")

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Karl
Solved:
Last query:
Last reply:
Revision history for this message
Best Karl (k-d) said :
#1

Insert 'continue" inside you code:
...
    wait(2)
    while not exists("1460481116500-3.png"):
        popup("Check Maitrey something wrong")
        continue

    click("1460481352717-1.png")
...

Revision history for this message
maitrey (maitrey-trivedi) said :
#2

Thanks Karl, that solved my question.