sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #36759
[Question #284856]: Find failedwhen searching on multiple Screens
New question #284856 on Sikuli:
https://answers.launchpad.net/sikuli/+question/284856
Hello. I am working on Eclipse IDE building a display test automation tool. I have been trying to find images on my secondary screen, and the help online has not solved my problem yet.
A simple call to getBounds() returns what is expected: 2 monitors side by side, with coordinates starting at (0,0,192,1080) and screen2 starting at (1920,0,1920,1200). When I try to find an image on screen2, Sikuli returns a find failed error.
This is what my code looks like:
Screen s1 = new Screen();
Screen s2 = new Screen(1);
System.out.println(s1.getBounds());
System.out.println(s2.getBounds());
If I try to find the image on the secondary screen with s2, I get the find failed. However, if I move the image to my primary screen and use s2 to find it, Sikuli successfully finds the image, but returns wrong coordinates. (as if it thinks it found the image in the secondary screen with coordinates from the secondary screen, but that was not the case)
The coordinates returned were (3454,203), which would indicate it was found in the secondary screen. But it did not.
If I try to find the same image in the same place (primary screen) but using s1 this time, I get correct coordinates, indicating it was found on the primary screen.
I need help trying to figure out how to tell Sikuli to watch for things on the secondary screen, and also some insight as to why the find() function would return wrong/out of place coordinates.
Thanks!
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.