sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #14369
[Question #213125]: FindFailed: image not image on the screen
New question #213125 on Sikuli:
https://answers.launchpad.net/sikuli/+question/213125
Hello all,
I am trying to automate Gmail SignIn process by using Eclipse,Selenium webdriver and Sikuli. I am giving input for the username and password using webdriver. But for the signin button, I am trying to use Sikuli, so, I took a screen shot of it and placed it in the eclipse project hierarchy (\imgs\signin.png). Below is my code:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Screen;
public class application {
public static void main(String[] args) throws InterruptedException
{
Screen s = new Screen();
WebDriver driver = new FirefoxDriver();
driver.get("http://www.gmail.com");
UIAutomation.movetoinputbox(driver, ".//*[@id='Email']", "abc");
UIAutomation.movetoinputbox(driver, ".//*[@id='Passwd']", "xyz");
try {
Thread.sleep(3000L);
s.click("imgs/signin.png" , 0);
} catch (FindFailed e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Below is the error that I get:
FindFailed: can not find imgs/signin.png on the screen.
Line ?, in File ?
at org.sikuli.script.Region.handleFindFailed(Region.java:421)
at org.sikuli.script.Region.wait(Region.java:512)
at org.sikuli.script.Region.find(Region.java:382)
at org.sikuli.script.Region.getLocationFromPSRML(Region.java:1134)
at org.sikuli.script.Region.click(Region.java:607)
at application.main(application.java:22)
I don't understand why I get the error saying that the .png image is not found on the screen. I will be very thankful if someone can help me. Thank you!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.