Mouse click blocked when running Sikuli test in batch file but not when running script through eclipse

Asked by patrick-nc

I am seeing a message when I run my test through a batch file that a mouse click is being blocked when running one of my tests. The test is able to launch the app under test but this error shows when interacting with the app:

[error] RobotDesktop: checkMousePosition: should be L[905,758]@S(0)
but after move is L[1413,863]@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.

I am running the batch file as an administrator and running the following command to get things working:

echo off
set classpath=<path_to_workspace>\\bin;<path_to_workspace>\\lib\\*
java -cp "<path_to_workspace>\\bin;<path_to_workspace>\\lib\\*" org.testng.TestNG <path_to_workspace>\\<xmlFile>

I also ran the test script not as an administrator to compare and the test stops at an earlier point in the test, so I don't think it's a run as admin issue.

I have talked with our security team and they don't see the anit-virus is blocking any kind of action during test execution. When running the test through eclipse the test script works with no mouse issues. The app is launched and the mouse clicks work as expected.

I am using Sikuli 2.0.1 and testNG 6.11. The machine is running Windows 10

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I have no idea, what the difference might be.

Make a simple Java test, that uses Java AWT Robot to do a click somewhere in Eclipse and then in command line.

A possible reason might be, that the TestNG stuff runs differently in Eclipse and from command line, but I do not have any experience with neither Eclipse nor TestNG.

Revision history for this message
phillsalt (phillsalt) said :
#2

Encountering a mouse click blocking error in Sikuli test run through a batch file, even when executed as an administrator, raises concerns about compatibility or configuration issues, especially given the script's success in Eclipse. Despite checking with the security team and ruling out antivirus interference, the problem persists, indicating a need for further investigation into batch file execution parameters or Sikuli configuration. Answer Source https://checkricepurity.com/

Can you help with this problem?

Provide an answer of your own, or ask patrick-nc for more information if necessary.

To post a message you must log in.