package webdriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Gmail {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver=new FirefoxDriver();
driver.get("http://www.gmail.com");
driver.findElement(By.id("Email")).sendKeys("[email protected]");
driver.findElement(By.id("Next")).click();
driver.findElement(By.id("Password")).sendKeys("welcome");
driver.findElement(By.id("signIn")).click();
}
}
I got the following error. Please help me
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"Next"}
Command duration or timeout: 186 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'