1

如何允许 Selenium WebDriver 在Opera 浏览器上接受不受信任的证书? Opera 安全问题

我尝试使用此代码。没有阳性结果

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new OperaDriver(capabilities);
4

1 回答 1

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);
于 2012-12-07T14:42:53.000 回答