sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #53808
[Question #687561]: SikuliX2.0.1 - checkMousePosition Error - Mouse clicking at incorrect location
New question #687561 on Sikuli:
https://answers.launchpad.net/sikuli/+question/687561
System Specifications - Windows 10, x64, java version "1.8.0_231"
sikulixapi2.0.1.jar (added in referenced libraries)
I am working on Eclipse(2019-12). I took an image of File on Eclipse UI only and tried to click it using Sikuli.
ISSUE- Click does not happen on the actual image - "File", instead the mouse moves towards File but clicks somewhat below the actual "File" area/region to be clicked.
OUTPUT -- (with checkMousePosition Error)
[log] highlight M[0,34 42x31]On(0) S 10000 for 0.0 secs
[error] RobotDesktop: checkMousePosition: should be L[21,49]@S(0)
but after move is L[20,50]@S(0)
Possible cause in case you did not touch the mouse while script was running:
Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
[log] CLICK on L[21,49]@S(0) (544 msec)
CODE
package utg_regression;
import org.sikuli.basics.Debug;
import org.sikuli.script.Match;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
public class SikuliTest {
public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
Screen screen = new Screen();
Pattern pattern = new Pattern("C:\\Users\\gp0924\\Desktop\\LatestSikuliImages\\File");
Match match = screen.exists(pattern);
if (null != match) {
match.highlight(); // already logs the match
match.click(); // do not search again
} else {
Debug.error("Not found: ", match);
}
}
}
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.