I'm successfully running sikuli scripts using Robot Framework.
To run sikuli keywords from RF you should at first be able to run your
sikuli tests from java. Steps to achieve this are provided here
(https://answers.launchpad.net/sikuli/+faq/1110)
After that steps to run simple robot test case are following:
[my_test_case.txt]
***Settings***
Library | recorder.Recorder
***Test Cases***
Simple Test
Find And Click
1) use jybot (instead of pybot)
2) add sikuli-script.jar to CLASSPATH variable
3) add your python/java libs and sikuli libs to pythonpath
$ export CLASSPATH=sikuli-script.jar
$ jybot --pythonpath myLib:Lib my_test_case.txt
Another way is to use robotframework.jar according to the
http://code.google.com/p/robotframework/wiki/JavaIntegration:
$ java -cp sikuli-script.jar:robotframework.jar
-Dpython.path=myLib:Lib org.robotframework.RobotFramework
my_test_case.txt
Regards,
Mykhailo.
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to
> robotframework-u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/robotframework-users?hl=en.
>
This is so cool! Would you be interested to write a how-to about this
somewhere? The steps to get Sikuli integrated looked pretty simple and
it would be great to have them visible also somewhere else than on
this mail list archive.
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
Hello,
Can you please help me? My integration works on Sikuli 0.10.2 but not on Sikuli X.
I added the sikuli-script.jar to the class path and sikuli-script.jar/Lib to jython.path
Then I add utill.py to Setting table as a library.
=============utill.py=================
from sikuli.Sikuli import *class utill:
def __init__(self):
setBundlePath(__file__[:__file__.rindex('\\')])def showDesktop(self):
click("1293626479770.png")def clickIE(self):
click(Pattern("1293624545365.png").similar(0.90))def enterUrl(self, url):
type("1293632514870.png", url + Key.ENTER )
=============utill.py=================This works fine with Sikuli 0.10.2 but with Sikuli X I get the following error when utill class is imported.
=============error on screen=================
Sikuli vision engine loaded.
Text Recgonizer inited.
Windows utilities loaded.
VDictProxy loaded.
[ ERROR ] Invalid syntax in file 'c:\projects\dev_documentation\09_automated_tests\automated-tests\scenario\tester.html'
in table 'Setting': Importing test library 'utill' failed: NoSuchMethodError: sun.awt.SunToolkit.isTranslucencyCapable(
Ljava/awt/GraphicsConfiguration;)Z
PYTHONPATH: [u'c:\\projects\\dev_documentation\\09_automated_tests\\automated-tests\\environment\\sikuli\\utill.sikuli',
'C:\\Python27\\Lib\\site-packages', 'C:\\Python27\\Lib\\site-packages\\robot\\libraries', 'C:\\Projects\\DEV_documentat
ion\\09_Automated_Tests\\automated-tests\\environment\\libs\\sikuli-script.jar\\Lib', 'C:\\jython2.5.1\\Lib', '__classpa
th__', '__pyclasspath__/', 'C:\\jython2.5.1\\Lib\\site-packages', '.']
CLASSPATH: C:\jython2.5.1\jython.jar;.;environment\libs\ant.jar;environment\libs\automated-test-util.jar;environment\lib
s\axis.jar;environment\libs\bcprov-jdk15.jar;environment\libs\commons-beanutils.jar;environment\libs\commons-cli.jar;env
ironment\libs\commons-codec.jar;environment\libs\commons-collections.jar;environment\libs\commons-discovery.jar;environm
ent\libs\commons-httpclient.jar;environment\libs\commons-lang.jar;environment\libs\commons-logging.jar;environment\libs\
itext.jar;environment\libs\log4j.jar;environment\libs\mail.jar;environment\libs\not-yet-commons-ssl.jar;environment\libs
\ojdbc14-10.2.0.1.0.jar;environment\libs\poi-3.2.0.jar;environment\libs\sikuli-script.jar;environment\libs\soapui-xmlbea
ns.jar;environment\libs\soapui.jar;environment\libs\wsdl4j-soapui-fixed.jar;environment\libs\xbean-soapui-fixed.jar;C:\P
rogram Files\Java\jre6\lib\rt.jar
java.lang.NoSuchMethodError:
at com.sun.awt.AWTUtilities.isTranslucencyCapable(Unknown Source)
at com.sun.awt.AWTUtilities.setWindowOpaque(Unknown Source)
at org.sikuli.script.Win32Util.setWindowOpaque(Win32Util.java:79)
at org.sikuli.script.ScreenHighlighter.init(ScreenHighlighter.java:174)
at org.sikuli.script.ScreenHighlighter.<init>(ScreenHighlighter.java:287)
at org.sikuli.script.Screen.initBounds(Screen.java:96)
at org.sikuli.script.Screen.<init>(Screen.java:108)
at sikuli.Screen$py.__init__$2(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\libs
\sikuli-script.jar\Lib\sikuli\Screen.py:19)
at sikuli.Screen$py.call_function(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\l
ibs\sikuli-script.jar\Lib\sikuli\Screen.py)
at sikuli.Sikuli$py.initSikuli$20(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\l
ibs\sikuli-script.jar\Lib\sikuli\Sikuli.py:179)
at sikuli.Sikuli$py.call_function(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\l
ibs\sikuli-script.jar\Lib\sikuli\Sikuli.py)
at sikuli.Sikuli$py.f$0(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\libs\sikuli
-script.jar\Lib\sikuli\Sikuli.py:183)
at sikuli.Sikuli$py.call_function(C:\Projects\DEV_documentation\09_Automated_Tests\automated-tests\environment\l
ibs\sikuli-script.jar\Lib\sikuli\Sikuli.py)
at utill$py.f$0(c:\projects\dev_documentation\09_automated_tests\automated-tests\environment\sikuli\utill.sikuli
\utill.py:3)
at utill$py.call_function(c:\projects\dev_documentation\09_automated_tests\automated-tests\environment\sikuli\ut
ill.sikuli\utill.py)
at robot.utils.importing$py._import$4(C:\Python27\Lib\site-packages\robot\utils\importing.py:109)
at robot.utils.importing$py.call_function(C:\Python27\Lib\site-packages\robot\utils\importing.py)
at robot.utils.importing$py.import_$2(C:\Python27\Lib\site-packages\robot\utils\importing.py:73)
at robot.utils.importing$py.call_function(C:\Python27\Lib\site-packages\robot\utils\importing.py)=============error on screen=================
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
--
Thanks a lot for writing such detailed instructions! I haven't had
need to try out Sikuli myself but know where to look for information
if I ever need to. Am I right that it isn't possible to create a
generic "SikuliLibrary" but instead you custom Sikuli script are the
library? Should we nevertheless link these instructions somewhere from
the project pages, possibly even from the test library pages?
One small correction about the Robot Framework preconditions: It is
actually possible to install the framework using Jython without having
Python installed at all, but this requires using the source
distribution. I noticed this wasn't mentioned too clearly on the
Installation wiki page and added some more information to
http://code.google.com/p/robotframework/wiki/Installation#Installing_from_source
I didn't think about creating generic "SikuliLibrary", and I looked
especially at the possibilities of extending existent Sikuli projects
via introducing Robot Framework.
I'll have a deep look at existent generic libraries for Robot
Framework and share my thoughts or even try to create a prototype of
generic "SikuliLibrary".
This is a nice topic for my next blogpost :)
> Should we nevertheless link these instructions somewhere from
> the project pages, possibly even from the test library pages?
It would be nice. Actually this blogpost is already linked from the
Sikuli documentation page as "Great 3-rd Party Articles"
> One small correction about the Robot Framework preconditions: It is
> actually possible to install the framework using Jython without having
> Python installed at all, but this requires using the source
> distribution. I noticed this wasn't mentioned too clearly on the
> Installation wiki page and added some more information to
> http://code.google.com/p/robotframework/wiki/Installation#Installing_from_source
Thank you for info, I've added update to the blogpost.
Best regards,
Mykhailo
I didn't think about creating generic "SikuliLibrary", and I looked especially at the possibilities of extending existent Sikuli projects via introducing Robot Framework.
I'll have a deep look at existent generic libraries for Robot Framework and share my thoughts or even try to create a prototype of generic "SikuliLibrary".
This is a nice topic for my next blogpost :)
> Should we nevertheless link these instructions somewhere from
> the project pages, possibly even from the test library pages?
It would be nice. Actually this blogpost is already linked from the Sikuli documentation page as "Great 3-rd Party Articles"
> One small correction about the Robot Framework preconditions: It is
> actually possible to install the framework using Jython without having
> Python installed at all, but this requires using the source
> distribution. I noticed this wasn't mentioned too clearly on the
> Installation wiki page and added some more information to
> http://code.google.com/p/robotframework/wiki/Installation#Installing_from_source
Thank you for info, I've added update to the blogpost.
Best regards,
Mykhailo
I forgot to do this before leaving for paternity leave but now this
great blog post is linked from
http://code.google.com/p/robotframework/wiki/TestLibraries