Skip to content

Instantly share code, notes, and snippets.

@adiohana
Last active July 3, 2019 14:10
Show Gist options
  • Save adiohana/548870bf2e51f2fcc45229c34c05b072 to your computer and use it in GitHub Desktop.
Save adiohana/548870bf2e51f2fcc45229c34c05b072 to your computer and use it in GitHub Desktop.
@Test
public void loadInsecureWebsite() {
//enable Security
chromeDevTools.send(Security.enable());
//set ignore certificate errors
chromeDevTools.send(Security.setIgnoreCertificateErrors(true));
//load insecure website
chromeDriver.get("https://expired.badssl.com/");
//verify that the page was loaded
Assert.assertEquals(true, chromeDriver.getPageSource().contains("expired"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment