Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'acceptInsecureCerts' W3C browser capability #1037

Merged
merged 2 commits into from
Jan 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support acceptInsecureCerts in driver options
  • Loading branch information
paaco committed Jan 28, 2020
commit 03de6ce487285066765ca8c079ce3f99a74a753f
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public class DriverOptions {
public final int pollAttempts;
public final int pollInterval;
public final boolean headless;
public final boolean acceptInsecureCerts;
public final boolean showProcessLog;
public final boolean showDriverLog;
public final Logger logger;
Expand All @@ -90,7 +91,7 @@ public class DriverOptions {
public final String processLogFile;
public final int maxPayloadSize;
public final List<String> addOptions;
public final List<String> args = new ArrayList();
public final List<String> args = new ArrayList<>();
public final Map<String, Object> proxy;
public final Target target;
public final String beforeStart;
Expand Down Expand Up @@ -150,6 +151,7 @@ public DriverOptions(ScenarioContext context, Map<String, Object> options, LogAp
start = get("start", true);
executable = get("executable", defaultExecutable);
headless = get("headless", false);
acceptInsecureCerts = get("acceptInsecureCerts", false);
showProcessLog = get("showProcessLog", false);
addOptions = get("addOptions", null);
uniqueName = type + "_" + System.currentTimeMillis();
Expand Down Expand Up @@ -275,6 +277,9 @@ private Map<String, Object> getCapabilities(String browserName) {
map.put("moz:firefoxOptions",
Collections.singletonMap("args", Collections.singletonList("-headless")));
}
if (acceptInsecureCerts) {
map.put("acceptInsecureCerts", true);
}
map = Collections.singletonMap("alwaysMatch", map);
return Collections.singletonMap("capabilities", map);
}
Expand Down