How to deal with certificates using Selenium?
用java写 Selenium自动化测试脚本时,如何处理证书问题?
ChromeOptions options = new ChromeOptions();
options.addArguments("--ignore-certificate-errors");
DesiredCapabilities chrome = DesiredCapabilities.chrome();
chrome.setCapability(ChromeOptions.CAPABILITY,options);
chrome.setCapability("acceptInsecureCerts",true);
ChromeDriver driver = new ChromeDriver(chrome);
driver.get("https://cdp-ppe.bba/login");
参考文章:
stack overflow
selenium版本
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>