Skip to content

Instantly share code, notes, and snippets.

@alexglow
Created November 20, 2013 22:10
Show Gist options
  • Save alexglow/7572001 to your computer and use it in GitHub Desktop.
Save alexglow/7572001 to your computer and use it in GitHub Desktop.
example Desired Capabilities section of a Java test
@BeforeClass
public static void setupDriver() throws MalformedURLException {
DesiredCapabilities caps = DesiredCapabilities.firefox();
caps.setCapability("version", "17");
caps.setCapability("platform", "Windows 7");
caps.setCapability("name", "Google test");
//caps.setCapability("tunnel-identifier", "BagEnd");
driver = new RemoteWebDriver(new URL("http://" + sauceUser + ":" + sauceKey + "@ondemand.saucelabs.com:80/wd/hub"),
caps);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@alexglow
Copy link
Author

Alternative specification format for Windows:
caps.setCapability("platform", Platform.XP);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment