Last active
February 21, 2016 21:17
-
-
Save slawekradzyminski/397193a8c06d61e1ded6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final String PREFS = "prefs"; | |
@Override | |
public WebDriver getDefaultDriver() { | |
return new ChromeDriver(getChromeCapabilities()); | |
} | |
private DesiredCapabilities getChromeCapabilities() { | |
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); | |
capabilities.setCapability(ChromeOptions.CAPABILITY, getChromeOptions()); | |
return capabilities; | |
} | |
private ChromeOptions getChromeOptions() { | |
ChromeOptions options = new ChromeOptions(); | |
options.addArguments(getChromeSwitches()); | |
options.setExperimentalOption(PREFS, getChromePrefs()); | |
return options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment