[英]Accepting untrusted SSL certificate using webdriver for a window that opens up on clicking a menu option
upon clicking a menu option in my application , it opens a new window which opens an URL where SSL cert has to be accepted. 在我的应用程序中单击菜单选项后,它将打开一个新窗口,该窗口打开一个必须接受SSL证书的URL。
I have added code in my Webdriver connection class , like :- 我在Webdriver连接类中添加了代码,例如:-
FirefoxProfile firefoxprofile = new FirefoxProfile();
firefoxprofile.setAcceptUntrustedCertificates(true);
firefoxprofile.setAssumeUntrustedCertificateIssuer(false);
capabilities.setCapability(FirefoxDriver.PROFILE, firefoxprofile);
driver = new FirefoxDriver(capabilities);
But this particular scenario is not getting handled by the above code...and I still get the untrusted SSL cert .... I am not sure how to handle this... 但是上面的代码并没有处理这种特殊情况……而且我仍然得到不受信任的SSL证书……。我不确定如何处理这个问题……
尝试以下代码
FirefoxProfile firefoxprofile = new FirefoxProfile(); firefoxprofile.setAcceptUntrustedCertificates(true); firefoxprofile.setAssumeUntrustedCertificateIssuer(false); driver = new FirefoxDriver(firefoxprofile);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.