Sikuli script does not run on Linux

856 Views Asked by At

My SikuliX script run on Windows10. However, under Linux (Debian 7.11), the script only opens my application and refuses to continue to execute the remaining script. I tried running on SikuliX versions 1.1.4 and 2.0.1. Gives an error message:

“[Error] App.isRunning: '[ps, -p, -1]' Process exited with an error: 1 (Exit value: 1)”

Please tell me what is the matter here and is it possible to fix this error?

System Information:

Debian OS 7.11

/usr/local/share/OpenCV/java/libopencv_java320.so
/opt/opencv/opencv-3.2.0/build/lib/libopencv_java320.so

I have java -version installed:

openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

Here is my script:

uc = App("/opt/UniversalReader/UniversalReader-v3.9.22_x64")
uc.open()
if not uc.isRunning(10): # wait max 10 seconds
    exit(1)
wait(0.3)
mTL = find("Iconuc.png") # find top left.
mBEx = find("PrimerBtn.png")
hover(mBEx.getCenter().click())
while not exists("Listofexamples.png"):
    sleep(5)
click("findTestDatabtn.png")
for x in findAll("Closebtn.png"):
    sleep(1)
click("Closebtn.png")
click("Closebtn.png")
click("Closebtn.png")
mClbtn = find("CloseBtnPanel.png")
click(mClbtn)
while not exists("WinClose.png"):
    sleep(5)
click("NoBtn.png")
mExitBtn = mTL.nearby(1000).right().find("ExitBtn.png") # find top right
click(mExitBtn)
while not exists("WinExit.png"):
    sleep(5)
click("NoBtn.png")
1

There are 1 best solutions below

1
On

This is RaiMan from SikuliX - sorry for the delay (you already asked on Launchpad).

Apparently the feature App.isRunning() does not work on Linux as expected. So I take it as a bug.

You should wait for your app to be ready in another way. You might e.g. check visually or by looking for a text on the screen.