Sikuli actions within the region

I am facing a problem when using sikuli through java, if there are two elements of the same type (or a similar image), it cannot click on the correct element. so I wanted to know if siculi can be made to work in a certain region and can someone explain how this can be done?

+5
source share
1 answer

Yes, siculi can work in a specific region. The challenge is to identify a region that contains only one of your two elements. You define the area by the x, y coordinates. You can also increase the size of the area based on the location of the unique template (image) on your display.

while exists("foo.png"):
    hover("bar.png")
    ClickMeRegion = find("bar.png").nearby(5).right()
    ClickMeRegion.click("baz.png")

, foo.png/bar.png/baz.png , . bar.png, , script. , 5 bar.png . baz.png. baz.png, .

.: http://doc.sikuli.org/region.html

+4

All Articles