sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22934
[Question #241419]: SikuliX and Robot Framework integration
New question #241419 on Sikuli:
https://answers.launchpad.net/sikuli/+question/241419
Hello,
I am a new Sikuli user that need your help to configure all that needed in order to develop my own keywords (Jython + Eclipse) and use them with Robot Framework.
Before i continue, i must say that i have tried to read all related posts but still can't close all the configurations.
Steps i did:
1. installed eclipse+pydev:
2. installed Jython ("cmd: jython --version" = Jython 2.5.1)
3. install robot framework for jython ("cmd: jybot --version" = Robot Framework 2.8.1 (Jython 2.5.1 on java1.7.0_25))
4. i have python and robot framework too (for other projects)
5. downloaded SikuliX from (from here - https://launchpad.net/sikuli/sikulix/1.0.1/+download/sikuli-setup.jar)
6. installed SikuliX (pack 1+3) + extracted Lib directory from sikuli-java.jar. Here is the directory content:
C:\SikuliX>dir
<DIR> Lib
<DIR> libs
1,452 runIDE.cmd
26,523,756 sikuli-ide.jar
13,689,366 sikuli-java.jar
18,413,040 sikuli-setup.jar
6,821 SikuliX-1.0.1-SetupLog.txt
7. Created new pydev project in eclipse, added the SikuliX/Lib directory to it and external jar (the sikuli-java.jar)
8. Created new .py file:
_________________________
from sikuli.Sikuli import *
class my_keyword(object):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
def __init__(self):
pass
def open_app(self):
App.open("calc.exe")
if __name__ == "__main__":
my = my_keyword()
my.open_app()
________________________________
9. ran it from eclipse and get the error:
________________________________
Traceback (most recent call last):
File "C:\eclipse\plugins\org.python.pydev_3.1.0.201312121632\pysrc\pydevd.py", line 1666, in <module>
debugger.run(setup['file'], None, None)
File "C:\eclipse\plugins\org.python.pydev_3.1.0.201312121632\pysrc\pydevd.py", line 1284, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "C:\Users\michaelf\workspace\NewTest\keywords.py", line 4, in <module>
from sikuli.Sikuli import *
File "C:\SikuliX\Lib\sikuli\__init__.py", line 6, in <module>
Debug.log(3,"Jython: sikuli: __init__: entering")
TypeError: log(): 1st arg can't be coerced to String
__________________________________
10. after i checked the problem i found that the error is because of calling the Debug.log() functions in Lib/Sikuli.py and Lib/init.py
11. so i temporary commented all occurrences of Debug.log() in these files
12. ran it again and SUCCESS.
So far there is one problem with the Debug.log() that i will be glad to know how to solve it.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Now the robot framework integration:
1. Created new directory c:\RB_project with the following files:
a. keywords.py as above
b. Tests.txt:
*** Settings ***
Library keywords.py
*** Testcases ***
Test
Open App
c. run.bat:
@echo off
set sikuli_jar=C:\SikuliX\sikuli-java.jar
set CLASSPATH=%sikuli_jar%
set JYTHONPATH=c:\SikuliX\Lib
jybot --pythonpath=keywords ^
--outputdir=results ^
--loglevel=TRACE ^
%*
2. i ran the run.bat as admin and the result is NOTHING... no robot framework result report, no errors, no calc application..
I tried everything to debug the problem but i just don't get why the result is nothing happend
_____The command line looks like ____
C:\RB_project>run.bat Tests.txt ->
C:\RB_project>
I will be glad for all help you can provide.
If any additional information needed please tell me.
Michael
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.