← Back to team overview

sikuli-driver team mailing list archive

[Question #140107]: The sikuli does not work after updating the latest sikuli-script.jar of sikuli x

 

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

i updated the latest sikuli-script.jar of sikuli x in eclipse,and the code in eclipse:
changed the import file as follow:

import org.sikuli.script.Screen;
import org.sikuli.script.Win32Util;
import org.sikuli.script.FindFailed;
public class test_Captcha {
	/**
	 * 验证captcha
	 */
	@Test()
	public void verifyLoginWithWrongCapture() {
        		Screen s = new Screen(100);
		try {

			s.click("imgs/1291974442781.png", 0);
			WaitForPageToLoad.pause(10000);
			s.click("imgs/1293501707656.png", 0);
			WaitForPageToLoad.pause(10000);

		} catch (FindFailed e) {
			e.printStackTrace();
		}
}

the console error is:
Setting connection parameters:127.0.0.1:3251
[TestRunner] Starting executor with time out:2147483647 milliseconds.
[TestNG] Running:
  C:\Documents and Settings\\Local Settings\Temp\testng-eclipse\testng-customsuite.xml

Windows utilities loaded.
FAILED: verifyLoginWithWrongCapture
java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities
	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:89)
	at store.scripts.xhtml_temp.test_Captcha.verifyLoginWithWrongCapture(test_Captcha.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:640)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:627)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:799)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1103)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
	at org.testng.TestRunner.runWorkers(TestRunner.java:1098)
	at org.testng.TestRunner.privateRun(TestRunner.java:727)
	at org.testng.TestRunner.run(TestRunner.java:581)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:315)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:310)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:272)
	at org.testng.SuiteRunner.run(SuiteRunner.java:221)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:40)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:83)
	at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:151)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.sun.awt.AWTUtilities
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	... 29 more


===============================================
    store.scripts.xhtml_temp.test_Captcha
    Tests run: 1, Failures: 1, Skips: 0
===============================================

null--------------------

===============================================
APP_NEW
Total tests run: 1, Failures: 1, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================

s.click("imgs/1291974442781.png", 0) this sikuli command dose not work at all

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