sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #19463
[Question #233079]: Python and Sikuli - Selecting from a list (multiple)
New question #233079 on Sikuli:
https://answers.launchpad.net/sikuli/+question/233079
Asking around a different way of doing this.
I am trying to look at the screen, decide if an image exists (from a list) and choose any that are there, then click "go". If none of the list items are there, it would execute `click("go.png")` and carry on. If there are any list items there, it clicks it and then executes the `click("go.png")`
wait("start.png", 10)
click("start.png")
class gameOne():
def pickone():
imageFile = ["one.png", "two.png", "three.png"]
if exists(imageFile):
click(imageFile)
click("go.png")
With this, the `click("start.png")` and `click("go.png")` work. It seems to just skips the class. No error is given.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.