if exists(img,0) takes over 10 seconds to execute
Hi, I have a script for verifying that a movie is streaming. If the movie have stopped the script will fail.
The problem is that "if exists(img,0)" takes over 10 seconds for me to execute. Why?
The region is the entire screen, since it is a movie playing in full screen. But shouldn't the comparison fail immediately if it can't see similarities? I have tried fiddeling with WaitScanRate and ObserveScanRate without success.
Example:
-------
app = getRegionOfApp()
duration = 30
time = datetime.
endTime = addSecsToTime(time, duration)
img = capture(app)
wait(5)
while datetime.
print "time before if: ", datetime.
if exists(img,0):
assert False
print "video seems to have stopped"
print "time after if: ", datetime.
img = capture(app)
wait(5)
print "video played fine in %s seconds" % (duration)
-------
[output]
time before if: 16:02:51.005000
time after if: 16:03:01.772000
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: