Implementing chrome option to accept insecure certificates
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
+import static org.openqa.selenium.remote.CapabilityType.ACCEPT_INSECURE_CERTS;
import static org.openqa.selenium.remote.CapabilityType.PAGE_LOAD_STRATEGY;
import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;
@@ -221,6 +222,11 @@ public ChromeOptions setUnhandledPromptBehaviour(UnexpectedAlertBehaviour behavi
return this;
}
+ public ChromeOptions setAcceptInsecureCerts(boolean acceptInsecureCerts) {
+ setCapability(ACCEPT_INSECURE_CERTS, acceptInsecureCerts);
+ return this;
+ }
+
public ChromeOptions setHeadless(boolean headless) {
args.remove("--headless");
if (headless) {
