public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C://chromedriver//chromedriver.exe");
WebDriver driver = new ChromeDriver();
//Maximize the Browser window
driver.manage().window().maximize();
driver.get("https://google.com");
WebElement signin = driver.findElement(By.id("gb_70"));
signin.click();
WebElement username = driver.findElement(By.id("Email"));
username.sendKeys("[email protected]");
WebElement next = driver.findElement(By.id("next"));
next.click();
WebElement password = driver.findElement(By.id("Passwd"));
password.sendKeys("password");
WebElement next1 = driver.findElement(By.id("signIn"));
next1.click();
My program terminates when it gets to the password entry screen.. it says
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"id","selector":"Passwd"} (Session info: chrome=53.0.2785.143)
However, I have tried ID element and Xpath element and they are both correct
: (