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()");
}
2条答案
按热度按时间kcrjzv8t1#
请试试这个,它管用。
dauxcl2d2#
如果您可以使用所需的凭据绕过安全检查来禁用安全检查,如果它与测试无关(节省时间),则更好,否则您需要使用第三方工具(如auto-it)来实现自动化。