How to control the newly opened window that appears after a click in Selenium WebDriver?
问题 I was just trying to automate the Gmail login process using Selenium WebDriver...After the email id is entered a new page opens to enter the password. How do I enter the password? WebElement element= driver.findElement(By.xpath("//*[@id='ident']")); element.sendKeys("THE EMAIL ID"); element.sendKeys(Keys.ENTER); WebElement ele= driver.findElement(By.xpath("//*[@id='passd']")); ele.sendKeys("THE PASSWORD"); ele.sendKeys(Keys.ENTER); 回答1: You have to switch the driver to current handler. Please