rainmanwy / robotframework-SikuliLibrary

Sikuli Robot Framework Library provide keywords for Robot Framework to test UI through Sikuli.
Apache License 2.0
147 stars 61 forks source link

SikuliLibrary not working on Debian (linux) #163

Open ghost opened 3 years ago

ghost commented 3 years ago

Scenario :

1) SikuliLibrary is installed - with pip - pip install robotframework-SikuliLibrary==1.0.8 (also tried version robotframework-SikuliLibrary 2.0.0) then I can see SikuliLibrary.jar at /usr/local/lib/python3.7/site-packages/SikuliLibrary/lib Folder

image

2) tesseract-ocr and libopencv-dev also installed properly with version : libopencv-dev is already the newest version (3.2.0+dfsg-6) tesseract-ocr is already the newest version (4.0.0-2).

3) when we try to run java jar file manually : java -jar SikuliLibrary.jar 10000 (where port is 10000) then getting following response:

WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
0 [main] INFO org.eclipse.jetty.server.Server  - jetty-7.x.y-SNAPSHOT
46 [main] INFO org.eclipse.jetty.server.handler.ContextHandler  - started o.e.j.s.ServletContextHandler{/,null}
167 [main] INFO org.eclipse.jetty.server.AbstractConnector  - Started SelectChannelConnector@0.0.0.0:10000

image

4) But when trying to run the robot script , getting error :

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/SikuliLibrary/sikuli.py", line 54, in __init__
    self.start_sikuli_process(port)
  File "/usr/local/lib/python3.7/site-packages/SikuliLibrary/sikuli.py", line 93, in start_sikuli_process
    self.remote = self._connect_remote_library()
  File "/usr/local/lib/python3.7/site-packages/SikuliLibrary/sikuli.py", line 208, in _connect_remote_library
    self._test_get_keyword_names(remote)
  File "/usr/local/lib/python3.7/site-packages/SikuliLibrary/sikuli.py", line 225, in _test_get_keyword_names
    raise RuntimeError('Failed to get_keyword_names!')

image

How to Solve above error?

Kindly help Note: Already seen issues : https://github.com/rainmanwy/robotframework-SikuliLibrary/issues/19 and https://github.com/rainmanwy/robotframework-SikuliLibrary/issues/20

but we are not getting our issue solved with above solution @rainmanwy kindly help

rainmanwy commented 2 years ago

You may configure "DISPLAY" environment when execute RF cases in shell.

below is the response from other guys, you may have a try.

I managed to install Sikuli successfully Wang Few simple issues like maven folder permission issues and you were correct, the big issue was the DISPLAY variable, it was auto created after enabling x11 properly in the host. Thank you so much! God bless you, tc and be happy!