下面的工作吗?
您正在寻找达到 100% 的进度然后再次循环?
f = open("C:\\test.htm",'W')
f.write('<font color="#347C2C">lOOPtEST</font><br />')
f.write('loop iteration' + (str (count)) + '<br />')
count = count + 1
f.close()
COUNT =10
POPUP("LOOPTEST")
//image compare from progress bar
import sikuli.Sikuli *
WebPath =('Z:\\ZZZautomation\\Web\\')
BuildPath = ("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
BuildNumber = glob.glob("Z:\BUILDS\Daily_BUILDS\QA_MainBranch_Install\*.install")
for filename in BuildNumber:
SmokeTestInfo = "SmokeTest_Build " + filename[45:50] + " Iteration 44"+".htm"
global Number
Number = filename[45:50]
global SmokeTest
SmokeTest = SmokeTestInfo
global count
count = 0
defMidProgress():
while not exists ("//path to image of progress bar @ 50%//",FOREVER)
//or
wait("//path to image of progress bar @ 50%//", FOREVER)
//using forevEr means sikuli will checK FOR 50% PROGRESS FOREVER
//the bottom execures once the condition above is met
open(WebPath + SmokeTest,'w')
f.write('<font color="#0000FF">Progress is at 50%</font><br />')
f.close()
// writes entry to html log fie
defFinalProgress():
while not exists ("//path to image of progress bar @ 100%//",FOREVER)
//or
wait("//path to image of progress bar @ 100%//", FOREVER)
//using forever means sikuli will check FOR 100% PROGRESS FOREVER
//the bottom execures once the condition above is met
open(WebPath + SmokeTest,'a')
f.write('<font color="#0000FF">Progress is at 100%</font><br />')
f.close()
// writes entry to html log fie
def Loop
count =0
def midProgress():
def FinalProgress():