Closed GoogleCodeExporter closed 9 years ago
Currently there is no such method in the API.
I use this workaround:
public static ScreenRegion hover(ScreenRegion region) {
final Mouse mouse = new DesktopMouse();
mouse.drop(region.getCenter());
return region;
}
Original comment by miglecz
on 24 Jan 2013 at 11:41
Thanks for the reply, but what did you use as the parameter 'region' here? I
tried using it by passing the image path as a parameter, but it doesn't work
for me.
Actually, my requirement is, I need to hover over a Button and then it shows
the Sub-menu.
Original comment by lasyaku...@gmail.com
on 24 Jan 2013 at 9:34
Basic usage:
http://code.google.com/p/sikuli-api/wiki/BasicUsage
More examples:
http://code.google.com/p/sikuli-api/w/list
Original comment by miglecz
on 24 Jan 2013 at 9:44
Oh no, I did try to tell you that I don't know what a region is, but what I
meant was, when I used mouse.drop(), it didn't work for me. And I was trying to
ask you if you have any troubleshooting tips for the same. Thanks.
Original comment by lasyaku...@gmail.com
on 24 Jan 2013 at 10:05
[deleted comment]
Okay, I figured it out now. This is the method I created to use for a hover on
an image, which is defined by the region 'r':
ScreenRegion s = new DesktopScreenRegion();
ScreenRegion r;
public ScreenRegion hover(String image, ScreenRegion r) {
Target target = new ImageTarget(new File(image));
r = s.wait(target, 5000);
s.find(target);
final Mouse mouse = new DesktopMouse();
mouse.drop(r.getCenter());
return r;
}
Thanks for the help.
Original comment by lasyaku...@gmail.com
on 29 Jan 2013 at 10:04
Original comment by doubles...@gmail.com
on 26 Feb 2013 at 7:37
Original issue reported on code.google.com by
lasyaku...@gmail.com
on 23 Jan 2013 at 10:51