New question #389067 on Sikuli:
https://answers.launchpad.net/sikuli/+question/389067

Hi there,

I'm trying to create a simple test case using Sikulix and Robot Framework. My 
issue is, that any time I start the Sikuli IDE, my jybot.bat won't execute my 
test cases anymore.

My set up is the following: 
- sikulix-1.1.0 (installed in C:\Apps\sikulix-1.1.0 using 
sikulixsetup-1.1.0.jar, options 1 and 2 were chosen)
- jython2.7.0 (installed in C:\Apps\jython2.7.0, using 
jython-installer-2.7.0.jar, added .\bin folder to user's PATH env. var.)
- robotframework-2.9.2 (downloaded and extracted tar.gz, installed by running 
"jython setup.py install")

I have then created the following Sikuli script, saved as a directory 
"simple.sikuli".

from sikuli import *

class Application():

    def foo(self):
        click("start_menu_bt.png")        

if __name__ == "__main__":
        app = Application()
        app.foo()

Within that directory, I've also created a "robot.txt" that looks like the 
following:

***Settings***
Library  simple.Application  WITH NAME  Application

***Test Cases***
Test Case 1
        Foo

Now, when I run the script using jybot from the command line, everything is 
fine:

C:\Dev\simple.sikuli>jybottest.bat robot.txt
==============================================================================
Robot
==============================================================================
Test Case 1                                                       | PASS |
------------------------------------------------------------------------------
Robot                                                                 | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output:  C:\Dev\simple.sikuli\results\output.xml
Log:     C:\Dev\simple.sikuli\results\log.html
Report:  C:\Dev\simple.sikuli\results\report.html


However, if I now start the Sikulix IDE and run exactly the same command again, 
I'll get the following:

C:\Dev\simple.sikuli>jybottest.bat robot.txt

C:\Dev\simple.sikuli>

So basically nothing appears to happen. By doing some trial and error, I've 
noticed that it has somehow to do with the sikuli import statement at the 
beginning of the script:
from sikuli import *

If I remove this line, this will be the output, which makes absolutely sense of 
course:

C:\Dev\simple.sikuli>jybottest.bat robot.txt
==============================================================================
Robot
==============================================================================
Test Case 1                                                       | FAIL |
NameError: global name 'click' is not defined
------------------------------------------------------------------------------
Robot                                                                 | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  C:\Dev\simple.sikuli\results\output.xml
Log:     C:\Dev\simple.sikuli\results\log.html
Report:  C:\Dev\simple.sikuli\results\report.html

If I add the line again, the problem occurs again and I won't have any output.
As a workaround, I can run sikulixsetup-1.1.0.jar again and simply install it 
with option 2 (Pack 2) active only. After this, I can run my script again using 
jybot. As soon as I start the Sikulix IDE again however, the problem occurs 
again.

As this is pretty annoying, I thought someone might have a hint what could be 
causing this issue. Apparently there is some kind of initialization done when 
the IDE is started, which messes around with my setup. But I'm kind of lost 
where to start digging.

Thanks in advance, I appreciate any help!

-- Daniel

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to