Skip to content

Instantly share code, notes, and snippets.

@shs96c
Created May 1, 2018 14:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shs96c/0951bdd0ca903ca22b2510e4438085c3 to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws MalformedURLException {
MutableCapabilities caps = new FirefoxOptions().setHeadless(false).setLegacy(false);
Map<String, Object> saasOptions = ImmutableMap.of(
"screenResolution", "1280x768",
"platform", "Windows 10",
"version", "57.0");
caps.setCapability("saas:config", saasOptions);
WebDriver driver = new RemoteWebDriver(
new URL("http://cloud.example.com"),
caps);
driver.quit();
}
@shs96c
Copy link
Author

shs96c commented May 1, 2018

JSON output of caps is:

{
  "acceptInsecureCerts": true,
  "browserName": "firefox",
  "marionette": true,
  "moz:firefoxOptions": {
    "args": [
      
    ],
    "prefs": {
      
    }
  },
  "saas:config": {
    "screenResolution": "1280x768",
    "platform": "Windows 10",
    "version": "57.0"
  }
}

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