如何允许 Selenium WebDriver 在Opera 浏览器上接受不受信任的证书?
我尝试使用此代码。没有阳性结果
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new OperaDriver(capabilities);
如何允许 Selenium WebDriver 在Opera 浏览器上接受不受信任的证书?
我尝试使用此代码。没有阳性结果
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new OperaDriver(capabilities);
为您的 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);