← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #241419]: [1.0.1] SikuliX and Robot Framework integration

 

Question #241419 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/241419

    Status: Answered => Open

michael is still having a problem:
Hi RaiMan,

First of all thank you very much for your fast response.

I did what you sad. Now it's looks like this:

_______ run.bat _____________
@echo off

set sikuli_jar=C:\SikuliX\sikuli-java.jar

set CLASSPATH=%sikuli_jar%


jybot --pythonpath=keywords ^
	  -Dsikuli.Debug=3 ^
      --outputdir=results ^
      --loglevel=TRACE ^
      %*

______ keywords.py _______________

import org.sikuli.basics.SikuliXforJython
import java.lang.System as JS
JS.setProperty("sikuli.Debug", 3)
import sys
from 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()

______________________

That what happens:

1. my c:\SikuliX\libs have not Lib folder created
2. i don't see [Debug]
3. i still see the "arg can't be coerced to String" error
4. here is the output after i ran the tests:

C:\RB_project>run.bat Tests.txt
[ ERROR ] Error in file 'C:\RB_project\Tests.txt': Importing test library 'C:\RB
_project\keywords.py' failed: TypeError: setProperty(): 2nd arg can't be coerced
 to String
Traceback (most recent call last):
  File "C:\RB_project\keywords.py", line 6, in <module>
    JS.setProperty("sikuli.Debug", 3)
PYTHONPATH:
  C:\jython2.5.1\Lib\site-packages\robot\libraries
  C:\jython2.5.1\Lib\site-packages
  C:\jython2.5.1\Lib
  __classpath__
  __pyclasspath__/
  .
  C:\RB_project
  /C:/SikuliX/sikuli-java.jar/Lib
CLASSPATH:
  C:\jython2.5.1\jython.jar
  C:\SikuliX\sikuli-java.jar
==============================================================================
Tests :: sikuli.Debug\=3
==============================================================================
Test                                                                  | FAIL |
No keyword with name 'Open App' found.
------------------------------------------------------------------------------
Tests :: sikuli.Debug=3                                               | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  C:\RB_project\results\output.xml
Log:     C:\RB_project\results\log.html
Report:  C:\RB_project\results\report.html

Thank you.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.