我如何允许Selenium WebDriver接受 Opera浏览器上的不受信任的证书?
我尝试使用此代码。没有积极的结果
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new OperaDriver(capabilities);
答案 0 :(得分:0)
为Opera浏览器制作自定义配置文件,然后设置功能
DesiredCapabilities capabilities = DesiredCapabilities.opera();
capabilities.setCapability("opera.profile", new OperaProfile("/path/to/existing/profile"));
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new OperaDriver(capabilities);