代码如下:
driver.get(“http://mail.126.com”);
try {
Thread.sleep(5000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
driver.switchTo().frame(driver.findElement(By.xpath("//*[@id=‘loginDiv’]/iframe")));
看网上好多都说这么获取,但是就是报错.
org.openqa.selenium.WebDriverException: Permission denied to access property "name"
Command duration or timeout: 0 milliseconds