Sikulix, Jenkins, subsequent actions might not work as expected

Asked by Zarami Arkim

Hi,
I have simple example in java. When I run in intellij this code

Screen screen = new Screen();

everything is ok. But when I do this in jenkins, I see this

sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.sikuli.util.SysJNA$WinKernel32
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.TimeT
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.TimeT$timeval_customizer
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.StructIO$DefaultCustomizer
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.TimeT$timeval
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.StructObject
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.NativeObject
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type org.bridj.AbstractIntegral
sty 31, 2016 5:41:32 PM org.bridj.BridJ log
INFO: Registering type java.lang.Number
[error] Location: outside any screen (363834776, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (363834776, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (363834784, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (363834776, 0) - subsequent actions might not work as expected
[error] RobotDesktop: checkMousePosition: should be L(363834784,0)
but after move is L(363834776,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.

Intellij and Jenkins are on the same computer.
I have this problem for a few days and I can not deal with it.

Thanks and regards
Zarami Arkim

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
Eugene S (shragovich) said :
#1

Do you have a multiple screen setup?

Revision history for this message
Zarami Arkim (zarami-arkim) said :
#2

No.

Revision history for this message
Zarami Arkim (zarami-arkim) said :
#3

My computer have one monitor and it runs on windows 10. Maybe this information help.

Revision history for this message
masuo (masuo-ohara) said :
#4

I do not know the fundamental solution, there is a workaround to use the Task Scheduler.
I could run Sikuli script from the Jenkins via the Task Scheduler.

[example:]
(1)create samplebatch.bat
C:\SikuliX\runsikuli.cmd -r C:\SikuliScript\sample.sikuli

(2)regist samplebatch.bat as sampleschedule to the Task Scheduler .

(3)regist sampleschedule as samplejob at build section of the Jenkins.
schtask /run /tn sampleschedule

And run samplejob on Jenkins.

Revision history for this message
Erich Fiederer (erichfiederer) said :
#5

Masuo, thank you so much for that. Fixed my problem!!

Revision history for this message
Octo (octogeo) said :
#6

@Erich / @Masuo

When you say "regist samplebatch.bat as sampleschedule to the Task Scheduler",
what are you referring to? Is "regist" a command?

Revision history for this message
Octo (octogeo) said :
#7

Ok, you meant Windows task scheduler.
It works now.
Thanks.

Revision history for this message
linmiaoling (linmiaoling) said :
#8

Masuo ,
(2)regist samplebatch.bat as sampleschedule to the Task Scheduler .

(3)regist sampleschedule as samplejob at build section of the Jenkins.
schtask /run /tn sampleschedule

what do you mean about these two steps? could you give more details?

thanks

Revision history for this message
linmiaoling (linmiaoling) said :
#9

same problem in my pc , someone help?

thanks

Revision history for this message
Octo (octogeo) said :
#10

(2) I believe he meant you create a task in MS Windows Task Scheduler to run your batch script.

You can do so either
- from Windows GUI
- or via the command line with schtasks create https://msdn.microsoft.com/en-us/library/windows/desktop/bb736357(v=vs.85).aspx

(3)Then in jenkins you trigger that task by adding a "Execute windows batch command" step in your build
in which you run the command:
schtask /run /tn sampleschedule

Can you help with this problem?

Provide an answer of your own, or ask Zarami Arkim for more information if necessary.

To post a message you must log in.