2016-03-28 58 views

回答

0

如果您可以通过绕过使用所需的凭证来禁用安全检查,如果它与测试无关(节省时间),则会更好,否则您需要使用第三方工具,例如自动将它自动化。

1

请尝试这个,它的工作原理。

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()"); 
} 
相关问题