向浏览器添加自定义功能时遇到问题。现在我使用下一个代码:
capabilities = Selenium::WebDriver::Remote::W3CCapabilities.firefox(accept_insecure_certs: true)
b = Watir::Browser.new( :firefox, :desired_capabilities => capabilities)
此代码输出弃用警告:
2017-07-18 16:13:05 WARN Selenium [DEPRECATION] Selenium::WebDriver::Remote::W3CCapabilities is deprecated. Use Selenium::WebDriver::Remote::Capabilities instead.
但是当我尝试按照建议使用Selenium :: WebDriver :: Remote :: Capabilities时,项目失败了:
Selenium::WebDriver::Error::SessionNotCreatedError: Unable to find a matching set of capabilities
我需要忽略无符号证书警告的功能,如何摆脱这种弃用警告?