SikuliX2.0.1 - checkMousePosition Error - Mouse clicking at incorrect location
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.
import org.sikuli.
import org.sikuli.
import org.sikuli.
public class SikuliTest {
public static void main(String[] args) throws InterruptedExce
// TODO Auto-generated method stub
Screen screen = new Screen();
Pattern pattern = new Pattern(
Match match = screen.
if (null != match) {
match.
match.click(); // do not search again
} else {
Debug.error("Not found: ", match);
}
}
}
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Garima Priya for more information if necessary.