您好。我一直都建立一个脚本登录到Gmail,但它不会键入之后我进入了电子邮件我的硒不会打开网址只需打开火狐
public static void main(String[] args) throws Exception {
System.setProperty("webdriver.chrome.driver", "E:\\Download\\chromedriver_win32\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1#identifier");
Thread.sleep(4000);
WebElement myElement = driver.findElement(By.id("Email"));
myElement.sendKeys("[email protected]");
driver.findElement(By.id("next")).click();
Thread.sleep(2000);
driver.findElement(By.id("Passwd"));
myElement.sendKeys("testing");
driver.findElement(By.id("signIn")).click();
}
谁能帮我这个代码的密码?
如何Firefox是越来越开?您已向Chrome发送代码。运行代码时是否收到异常? –