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()");
}

09-17 12:47
查看更多