sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #00159
[Bug 697935] Re: Exists then click fails when run from NetBeans
It fails, when the Python layer tries to access the Java layer. You do not have sikuli-script.jar in the Java Path.
(popup works, because it is totally handled in the Python layer)
Please use the following recommended setup with NetBeans on Windows:
(Nothing more needed than just this! No unjarred sikuli-script.jar
needed!)
-- add to System Path (system settings -> advanced -> environment variables)
C:\Program Files\Sikuli X\libs;C:\Program Files\Java\jre6\bin
-- in NetBeans in the project properties section -> Python -> manage
to JavaPath add
C:\Program Files\Sikuli X\sikuli-script.jar
to Python Path add
C:\Program Files\Sikuli X\sikuli-script.jar\Lib
(the last one is a bit tricky: when you have selected sikuli-script.jar
in the file dialog, manually add \Lib to the file name before clicking
to add it to the list)
that is all. have fun.
** Summary changed:
- Exists then click fails when run from NetBeans
+ Sikuli X / Windows / Netbeans --- setup problems
** Changed in: sikuli
Status: New => In Progress
** Description changed:
+ This is not a bug. But we leave it for a moment until docs are ready.
+ ---------------------------------------------------------------------
+
The following code runs successfully when executed from the sikuli IDE
setBundlePath ("C:\\SikuliTest\\ImageLibrary\\96dpi\\SignIn\\")
if exists("SignIn_Launch.png", 10):
- doubleClick("SignIn_Launch.png")
+ doubleClick("SignIn_Launch.png")
However the same code fails when executed from NetBeans
from sikuli.Sikuli import * was included with NetBeans
VDictProxy loaded.
Windows utilities loaded.
EventManager loaded.
Traceback (most recent call last):
- File "H:\SikuliCurrent\SikuliX\NetBeansProject\VCD_TestAutomationFunctionsInDevelopment\new_module.py", line 6, in <module>
- if exists("SignIn_Launch.png", 10):
- File "C:\SikuliXUnjar\sikuli-script\Lib\sikuli\Region.py", line 108, in exists
- ret = JRegion.exists(self, target, timeout)
- at org.sikuli.script.Finder.<clinit>(Finder.java:22)
+ File "H:\SikuliCurrent\SikuliX\NetBeansProject\VCD_TestAutomationFunctionsInDevelopment\new_module.py", line 6, in <module>
+ if exists("SignIn_Launch.png", 10):
+ File "C:\SikuliXUnjar\sikuli-script\Lib\sikuli\Region.py", line 108, in exists
+ ret = JRegion.exists(self, target, timeout)
+ at org.sikuli.script.Finder.<clinit>(Finder.java:22)
- at org.sikuli.script.Region.findNow(Region.java:589)
+ at org.sikuli.script.Region.findNow(Region.java:589)
- at org.sikuli.script.Region.wait(Region.java:277)
+ at org.sikuli.script.Region.wait(Region.java:277)
- at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown
+ at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown
Source)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
+ at java.lang.reflect.Method.invoke(Unknown Source)
Sikuli vision engine loaded.
Text Recgonizer inited.
-
- java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError
+ java.lang.ExceptionInInitializerError:
+ java.lang.ExceptionInInitializerError
System Path
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jre6\bin;C:\SikuliXUnjar\sikuli-script\Lib;C:\Program Files\Sikuli X\libs
User Path
C:\Program Files\Sikuli X\libs
File Structure:
Install Directory
C:\Program Files\Sikuli X
JRE
C:\Program Files\Java\jre6
Unjarred and sikuli-script.jar
C:\SikuliXUnjar\sikuli-script\Lib
Images
C:\SikuliTest
OS W7x32
Message from a successful run via SikuliIDE
Sikuli vision engine loaded.
Text Recgonizer inited.
Windows utilities loaded.
VDictProxy loaded.
EventManager loaded.
[info] double click on (114,137), MOD: 0
[debug] showTarget 74 97 80 80
[debug] close all ScreenHighlighter
[debug] close all ScreenHighlighter
[info] Exited with code 0
Note:
popup works, this is the test I use to verify that Sikuli is loaded properly.
cfgparser works
all of my scripts function in SikuliIDE
All Sikuli scripts that functioned previously in NetBeans no longer function.
** Summary changed:
- Sikuli X / Windows / Netbeans --- setup problems
+ Sikuli X / Windows / NetBeans --- setup problems
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/697935
Title:
Sikuli X / Windows / NetBeans --- setup problems
Status in Sikuli:
In Progress
Bug description:
This is not a bug. But we leave it for a moment until docs are ready.
---------------------------------------------------------------------
The following code runs successfully when executed from the sikuli IDE
setBundlePath ("C:\\SikuliTest\\ImageLibrary\\96dpi\\SignIn\\")
if exists("SignIn_Launch.png", 10):
doubleClick("SignIn_Launch.png")
However the same code fails when executed from NetBeans
from sikuli.Sikuli import * was included with NetBeans
VDictProxy loaded.
Windows utilities loaded.
EventManager loaded.
Traceback (most recent call last):
File "H:\SikuliCurrent\SikuliX\NetBeansProject\VCD_TestAutomationFunctionsInDevelopment\new_module.py", line 6, in <module>
if exists("SignIn_Launch.png", 10):
File "C:\SikuliXUnjar\sikuli-script\Lib\sikuli\Region.py", line 108, in exists
ret = JRegion.exists(self, target, timeout)
at org.sikuli.script.Finder.<clinit>(Finder.java:22)
at org.sikuli.script.Region.findNow(Region.java:589)
at org.sikuli.script.Region.wait(Region.java:277)
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
Sikuli vision engine loaded.
Text Recgonizer inited.
java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError
System Path
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jre6\bin;C:\SikuliXUnjar\sikuli-script\Lib;C:\Program Files\Sikuli X\libs
User Path
C:\Program Files\Sikuli X\libs
File Structure:
Install Directory
C:\Program Files\Sikuli X
JRE
C:\Program Files\Java\jre6
Unjarred and sikuli-script.jar
C:\SikuliXUnjar\sikuli-script\Lib
Images
C:\SikuliTest
OS W7x32
Message from a successful run via SikuliIDE
Sikuli vision engine loaded.
Text Recgonizer inited.
Windows utilities loaded.
VDictProxy loaded.
EventManager loaded.
[info] double click on (114,137), MOD: 0
[debug] showTarget 74 97 80 80
[debug] close all ScreenHighlighter
[debug] close all ScreenHighlighter
[info] Exited with code 0
Note:
popup works, this is the test I use to verify that Sikuli is loaded properly.
cfgparser works
all of my scripts function in SikuliIDE
All Sikuli scripts that functioned previously in NetBeans no longer function.
References