我试图点击不少于3张相同的图片,但是findAll()
我很难想sikuli想要只选择1张图片,如果有的话我不想选择任何图像不是3或更多。
if exists(Pattern("1474201252795.png").similar(0.95)):
wait(1)
for x in findAll(Pattern("1474201252795.png").similar(0.95)):
click(x)
答案 0 :(得分:2)
因此,首先计算图像并检查计数是否高于3.
imageCount=0
images = []
# find all images and store them in a list to prevent additional search
for image in findAll("Win7StartBtn.png"):
images.append(image)
#check list length and act accordingly
if len(images) >= 3:
for image in images:
image.click()