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

import os, sys

openApp("C:\Program Files\Internet Explorer\iexplore.exe https://some_website")
if find("1531129693208.png"):
    print "Connexion impossible"
    os.system("taskkill /im iexplore.exe /f")
if exists("1531127199130.png"):
    type ("Test")
    os.system("taskkill /im iexplore.exe /f")
    print "Connexion a somewebsite OK"
    os.system("taskkill /im iexplore.exe /f")
    print "Erreur interface"

Thanks in advance for your help.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
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.