APISonar


org.openqa.selenium.remote.DesiredCapabilities.android

> org > openqa > selenium > remote > DesiredCapabilities > android
org APIs openqa APIs selenium APIs remote APIs DesiredCapabilities APIs android APIs

Example 1
private void registerDefaults(Platform current) {
    if (current.equals(Platform.ANDROID)) {
      registerDriver(DesiredCapabilities.android(), "org.openqa.selenium.android.AndroidDriver");
      return;
    }
    for (Map.Entry<Capabilities, String> entry : defaultDrivers.entrySet()) {
      Capabilities caps = entry.getKey();
      if (caps.getPlatform() != null && caps.getPlatform().is(current)) {
        registerDriver(caps, entry.getValue());
      } else if (caps.getPlatform() == null) {
        registerDriver(caps, entry.getValue());
      }
    }
  }
Example 2
private static DesiredCapabilities getAndroidCapabilities(DesiredCapabilities userPrefs) {
    DesiredCapabilities caps = DesiredCapabilities.android();
    caps.setCapability(CapabilityType.TAKES_SCREENSHOT, true);
    caps.setCapability(CapabilityType.ROTATABLE, true);
    caps.setCapability(CapabilityType.SUPPORTS_BROWSER_CONNECTION, true);
    if (userPrefs != null) {
      caps.merge(userPrefs);
    }
    return caps;
  }