当我点击“继续访问此网站(不推荐)”时,会弹出此图像。
最佳答案
请尝试一下,它有效。
public void TestSSLerror() {
//Download IEDriver exe and past in project
driver = new FirefoxDriver();
//Open WebSite for time being let's take http://test.com
driver.get("https://test.com");
//now we are going to use javascipt ,This will click on "Continue to this website (not recommended)" text and will
//push us to the page
driver.navigate().to("javascript:document.getElementById('overridelink').click()");
}
关于java - 如何在 IE 11 中使用 Selenium webdriver 单击安全警告窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36262668/