FIREFOX:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
driver= new FirefoxDriver(capabilities);
driver.get("yourwebsite url that had certificate error");
Chrome:
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
System.setProperty("webdriver.chrome.driver", "path to file chromedriver.exe");
WebDriver driver = new ChromeDriver(capabilities);
driver.get("yourwebsite url that had certificate error");
No comments:
Post a Comment