Skip to content

Commit 2afcc4c

Browse files
committed
Implementing chrome option to accept insecure certificates
1 parent 74831e4 commit 2afcc4c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java/client/src/org/openqa/selenium/chrome/ChromeOptions.java

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import static com.google.common.base.Preconditions.checkArgument;
2121
import static com.google.common.base.Preconditions.checkNotNull;
22+
import static org.openqa.selenium.remote.CapabilityType.ACCEPT_INSECURE_CERTS;
2223
import static org.openqa.selenium.remote.CapabilityType.PAGE_LOAD_STRATEGY;
2324
import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
2425
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;
@@ -221,6 +222,11 @@ public ChromeOptions setUnhandledPromptBehaviour(UnexpectedAlertBehaviour behavi
221222
return this;
222223
}
223224

225+
public ChromeOptions setAcceptInsecureCerts(boolean acceptInsecureCerts) {
226+
setCapability(ACCEPT_INSECURE_CERTS, acceptInsecureCerts);
227+
return this;
228+
}
229+
224230
public ChromeOptions setHeadless(boolean headless) {
225231
args.remove("--headless");
226232
if (headless) {

0 commit comments

Comments
 (0)