← Back to team overview

sikuli-driver team mailing list archive

[Question #205764]: How to use loop

 

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

Below is my script, please help for a specified method below: 

from __future__ import with_statement
from sikuli.Sikuli import *
addImagePath("feedback.sikuli")
class trydoc(object):
    def startApp(self):
        openApp("C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.EXE")
        while not exists("Pr00fGuru-1.png"):
            sleep(5)
    def signIn(self):
        click("Pr00fGuru.png")
        click("TTY.png")
        wait(5)
        while not exists("GuruEditinga.png"):
            sleep(5)
        click("IZITIBIIIU.png")
        type("ankit@xxxxxxxxxxxxx\t")
        type("ankit1")
        click("1344849244764.png")
        wait(2)
        click("1344917954201.png")
        while not exists("IryasamplePr.png"):
            sleep(5)
        click("1344918008136.png")
    def checking(self):
     ----- In this method i want to implement loop like wherever sikuli finds image say (image.png) it clicks on (image2.png) & where it finds (image3.png) it clicks on (image4.png) also, this loop must run until sikuli finds (image5.png) 
            
        
    def runTest(self):
        self.startApp()
        self.signIn()
        #self.verifyFeedback()
        #self.verifySuggestion()
        #verifyCancel()        
if __name__ == "__main__":
    tryIt= trydoc()
    tryIt.runTest()

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