← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #569701]: Simple function to wait for an image before clicking

 

Question #569701 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/569701

    Status: Open => Answered

Roman Podolyan proposed the following answer:
Function code (tested):
_______
def wait_and_click(my_image, time):
    wait(my_image, time)
    click(getLastMatch())
______

"time" is in seconds.

Help chapter about wait() and other functions ready-available:
http://doc.sikuli.org/region.html#Region.wait

But be informed that Sikuli may not find _any_ image on _any_ machine,
different machines display resolutions and DPI must match.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.