Monitor Sikulix scenarios

Asked by chekhab Imed on 2018-07-09

Hello, I can not supervise my sikulix scenarios.
I put error codes in my script to follow the progress of the script.
By running the script from the Sikulix IDE, it works well, but when I run an nrpe-check from my centreon console i have the following error message:.

[error] Location: outside any screen (20170384, 0) - subsequent actions might not work as expected

Script:
import os, sys

openApp("C:\Program Files\Internet Explorer\iexplore.exe https://some_website")
time.sleep(10)
if find("1531129693208.png"):
    click("1531125950641.png")
else:
    print "Connexion impossible"
    sys.exit(1)
    os.system("taskkill /im iexplore.exe /f")
if exists("1531127199130.png"):
    click("1531127226279.png")
    type("Test")
    find("1531125270172.png")
    click("1531127307658.png")
    type ("Test")
    click("1531127353933.png")
    find("1531125328620.png")
    click("1531125337525.png")
    os.system("taskkill /im iexplore.exe /f")
    print "Connexion a somewebsite OK"
    sys.exit(0)
else:
    os.system("taskkill /im iexplore.exe /f")
    print "Erreur interface"
    sys.exit(3)

Thanks in advance for your help.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-07-09
Last reply:
2018-07-10
RaiMan (raimund-hocke) said : #1

what ever this might be:
nrpe-check from my centreon console

it apparently does not have a standard real screen or some valid simulation (X11 based e.g. xvfb) at runtime of the script.

SikuliX needs access to a real screen or something equivalent, that is accepted by Java AWT Robot.

Make sure, you use the latest SikuliX, preferably 1.1.3 nightly and switch on debugging.

chekhab Imed (ch3k) said : #2

The sikulix (1.1.2) is installed on a W7. the check I'm trying to make is launched from centreon with the following command:
 ./check_nrpe -H W7-Machine -c "check_sikulix" -t 500

I also think it comes from the screen. Is there any parameter to add to my Sikulix script so that Centreon can execute the command with the right resolution or on the right screen.

Thank you in advance.

RaiMan (raimund-hocke) said : #3

As mentioned: switch on debugging (see docs)

for the Java command use -Dsikuli.Debug=3

and look in the output, what is said about screens/monitors.

If no monitor is detected, then SikuliX cannot help you.

ask your centreon environment about that.

Can you help with this problem?

Provide an answer of your own, or ask chekhab Imed for more information if necessary.

To post a message you must log in.