Last active
August 29, 2015 13:56
-
-
Save barancev/8832357 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
/* setters-style: */ | |
// CommonOptions implements Options | |
CommonOptions commonOptions = new CommonOptions(); | |
commonOptions.setProxy(...); | |
commonOptions.setOption("randomKey", "randomValue"); | |
// FirefoxOptions implements Options | |
FirefoxOptions firefoxOptions = new FirefoxOptions(); | |
firefoxOptions.setNativeEvents(true); | |
// FirefoxDriver(Options options...) | |
WebDriver driver = new FirefoxDriver(commonOptions, firefoxOptions); | |
CommonOptions commonOptions = new CommonOptions(); | |
commonOptions.setBrowser(FIREFOX); | |
commonOptions.setVersion("26"); | |
FirefoxOptions firefoxOptions = new FirefoxOptions(); | |
firefoxOptions.setNativeEvents(true); | |
SauceOptions sauceOptions = new SauceOptions(); | |
sauceOptions.recordVideo(false); | |
// RemoteWebDriver(URL url, Options options...) | |
WebDriver driver = new RemoteWebDriver(new URL(...), commonOptions, firefoxOptions, sauceOptions); | |
/* builder-style: */ | |
Options commonOptions = new CommonOptions.Builder().setProxy(...).build(); | |
Options firefoxOptions = new FirefoxOptions.Builder().setNativeEvents(true).build(); | |
WebDriver driver = new FirefoxDriver(commonOptions, firefoxOptions); | |
Options commonOptions = new CommonOptions.Builder().setBrowser(FIREFOX).setVersion("26").build(); | |
Options firefoxOptions = new FirefoxOptions.Builder().setNativeEvents(true).build(); | |
Options sauceOptions = new SauceOptions.Builder().recordVideo(false).build(); | |
WebDriver driver = new RemoteWebDriver(new URL(...), commonOptions, firefoxOptions, sauceOptions); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment