← Back to team overview

sikuli-driver team mailing list archive

[Question #665797]: Image reconition not working after Settings.OcrTextRead = true;

 

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

Installed using 2 & 3 option checked


Settings.OcrTextRead = true;
			Settings.OcrTextSearch = true;
			
			for(int i = 0; i < 4; i++) {
				Thread.sleep(3000);
				Rectangle rectangle = new Rectangle(500, 550+(i*25), 75, 20);
				screen.setRect(rectangle);
				String xx= screen.text();
				xx= xx.substring(1);
				System.out.println("$"+xx);
			}
			
			Settings.OcrTextRead = false;
			Settings.OcrTextSearch = false;
			Pattern scrollDown = new Pattern(iconPath + "scrolldown.png");
			screen.mouseMove(scrollDown);
			screen.click();

FindFailed: D:/Users/xxxx/xxxxxx/images/scrolldown.png: (74x21) in S(0)[0,0 1366x768] E:Y, T:3.0
  Line 2759, in file Region.java

	at org.sikuli.script.Region.wait(Region.java:2759)
	at org.sikuli.script.Region.find(Region.java:2336)
	at org.sikuli.script.Region.getLocationFromTarget(Region.java:3213)
	at org.sikuli.script.Region.mouseMove(Region.java:3986)
	at xxx.SikuliMain.testM(SikuliMain.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:744)
	at org.testng.TestRunner.run(TestRunner.java:602)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
	at org.testng.TestNG.runSuites(TestNG.java:1144)
	at org.testng.TestNG.run(TestNG.java:1115)
	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

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