Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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