|
|
|
@ -2,7 +2,6 @@ package com.olexyn.tabdriver;
|
|
|
|
|
|
|
|
|
|
import org.openqa.selenium.chrome.ChromeOptions;
|
|
|
|
|
import org.openqa.selenium.remote.CapabilityType;
|
|
|
|
|
import org.openqa.selenium.remote.DesiredCapabilities;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
|
@ -10,11 +9,10 @@ public abstract class DefaultTabDriverConfig implements TabDriverConfigProvider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public DesiredCapabilities getCapabilities() {
|
|
|
|
|
var cap = DesiredCapabilities.chrome();
|
|
|
|
|
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
|
|
|
|
|
public ChromeOptions getOptions() {
|
|
|
|
|
|
|
|
|
|
ChromeOptions options = new ChromeOptions();
|
|
|
|
|
options.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
|
|
|
|
|
options.addArguments("--start-maximized");
|
|
|
|
|
if (isHeadless()) {
|
|
|
|
|
options.addArguments("--window-size=1920,1080");
|
|
|
|
@ -26,7 +24,6 @@ public abstract class DefaultTabDriverConfig implements TabDriverConfigProvider
|
|
|
|
|
chromePrefs.put("download.default_directory", getDownloadDir());
|
|
|
|
|
chromePrefs.put("download.prompt_for_download", false);
|
|
|
|
|
options.setExperimentalOption("prefs", chromePrefs);
|
|
|
|
|
cap.setCapability(ChromeOptions.CAPABILITY, options);
|
|
|
|
|
return cap;
|
|
|
|
|
return options;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|