← Back to team overview

sikuli-driver team mailing list archive

[Question #271257]: I am not finding the right solution for my code

 

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

I am a new learner of Sikuli tool. I have framed the below code to locate a particular image from the screen full of images. But the result is not as expected. While loop is not executed till my image is found. Kindly give your inputs for getting right behavior of code

#my code
openApp("C:\Program Files\Google\Chrome\Application\chrome.exe")
type("l", KEY_CTRL)
type("http://a-z-animals.com/animals/pictures/"; + Key.ENTER)
wait(2)
while not exists("1441797102403.png"): #bottom of the page
    type(Key.PAGE_DOWN)
    if exists("1441859075284.png"): #in order to locate an image
        popup("Hurray!")
        notFound = False
        break
    if notFound:
        popup("OMG")

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.