← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #217841]: Win2008 - doubleclick not working

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
If the target is found in all cases, then it usually is some timing or
focus problem (if it sometimes works and sometimes not).

to debug the situation, first make sure, that the window or app has
focus before the doubleClick (e.g. click on some neutral area before,
that gives focus to your target window).

then find your target:
target = find(icon)
target.highlight(1) # for debug only

then act on it
hover(m) # move mouse over target
wait(0.5) # give time to GUI
click(target)
wait(0.1) # timing for the doubleClick()
click(target) # or use doubleClick() directly

So you have all options to assure focus and timing.

Once you have found the cause, you can slim down the code again.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.