java - 如何在 IE 11 中使用 Selenium webdriver 单击安全警告窗口?

标签 java internet-explorer selenium

Security Warning Window

当我点击“继续访问此网站(不推荐)”时,会弹出此图像。

最佳答案

请尝试一下,它有效。

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/

相关文章:

java - 带 float 的 View 支架

java - 线程中的异常 "main"java.lang.IllegalStateException :The path to the driver executable must be set by the : system property

internet-explorer - mailto 在 IE 中失败,其中有很长的正文文本。有没有办法解决这个问题?

internet-explorer - Jaws 16 未读取 IE 11 中的 "alert"角色

javascript - 自动测试网站的 IE7 javascript 错误?

javascript - 通过 Selenium 执行时 Jquery 脚本无法正常运行(SCRIPT5009 : '$' is undefined ) in IE 9. 但在 Web 浏览器控制台中正常运行

java - 如何按特定顺序运行 Maven 测试?

java - 如何在没有属性类的情况下拥有相同的程序,这里是 int 私有(private)计数器

java - 如何在 TableView (javaFX 8) 的 TableColumn 中显示 "single bar chart"?

java - 为什么我的 JavaCL 只检测到集成显卡?