← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #167494]: Click images in the same row one at a time

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Supposing, that the dimension and the position of the clickable elements
are fixed relative to the other visual parts of the app window, I
suggest not to use find on the objects itself, but on something fixed
near the region containing your images and then calculate/measure the
offset to the click position.

example based on this question page:
we want to hover the menu entries in the top area (Overview, Code, ...) one after the other
the offsets and other pixel values will vary depending on your logo capture, if you test it

ref = find( "sikuliLogo.png")
ref.highlight(2)
mFirst = ref.getBottomRight().right(40).above(14)
mDiff = 60
for n in range(6):
    hover(mFirst.right(n*mDiff))
    wait(1)

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