sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29305
Re: [Question #257761]: How to use logical operators in sikuli?
Question #257761 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/257761
RaiMan proposed the following answer:
this is a time optimized version:
if(exists("7655676576.png", 0) or exists("7576577.png", 0)): # comment 1
click(Pattern("8987989.png").targetOffset(11,0))
if exists("1416238084264.png", 2): # comment 2
print "Ticket is working fine"
else:
print "Not working"
-- comment 1
supposing one of the images should be there, this takes only about 1 second in any case, whereas the other version takes 3 to 6 seconds if one of the images is not there (standard waiting times)
-- comment 2
this version will come back in the moment, the image is found.
The version with sleep waits 2 seconds unconditionally.
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.