← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #248970]: find faied exception

 

Question #248970 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/248970

Description changed to:
I am try to click on google search bar , iam using follwong code

                Screen s = new Screen();
		WebDriver driver = new FirefoxDriver();

		driver.get("http://google.com";);
		driver.manage().window().maximize();

		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		Pattern pattern =  new Pattern("imgs/searchBar.png");
		
		s.click(pattern);
		s.type(pattern, "Seacrh something",0); 


It is giving me error

Exception in thread "main" FindFailed: can not find P(imgs/searchBar.png) S: 0.7 on the screen.
  Line 1574, in file Region.java

	at org.sikuli.script.Region.handleFindFailed(Region.java:1574)
	at org.sikuli.script.Region.wait(Region.java:1682)
	at org.sikuli.script.Region.find(Region.java:1590)
	at org.sikuli.script.Region.getLocationFromTarget(Region.java:1991)
	at org.sikuli.script.Region.click(Region.java:2197)
	at org.sikuli.script.Region.click(Region.java:2181)
	at FirstTest.First.main(First.java:34)


Why it not finding image, 
Thanks

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