← Back to team overview

sikuli-driver team mailing list archive

[Question #140246]: Sikuli from robotframework - works in 0.10.2 but not in X

 

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

I am trying to use Sikuli X from Jython(using robot framework) on windows xp.

I added the sikuli-script.jar to the class path and sikuli-script.jar/Lib to jython.path

Then I tried to run the jython script(from robot framework) .
=============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=================


Can you please help me?

Thanks in advance for the help and the wonderful tool.

ps: I wanted to let you know that you guys are doing a great job. I showed the automation I did with Sikuli to the business analysts at my company and they told me it was magic :)

Warm Regards,
\Sajjad.

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