![](/img/trans.png)
[英]How to click on allow button on popup window in selenium Webdriver by using Java
[英]How to click on the Security Warning window using Selenium webdriver in IE 11?
请试试这个,它有效。
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()");
}
如果您可以通过绕过使用所需的凭据来禁用安全检查会更好,如果它与测试无关(节省时间),否则您需要使用像 auto-it 这样的第三方工具来自动化它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.