Examples of RemoteWebDriver


Examples of org.openqa.selenium.remote.RemoteWebDriver

      generate(type, variation);
    }
  }

  private static void generate(DeviceType device, DeviceVariation variation) throws Exception {
    RemoteWebDriver driver = null;
    try {
      IOSCapabilities caps = IOSCapabilities.iphone("Safari");
      if (device == DeviceType.ipad) {
        caps.setDevice(DeviceType.ipad);
      }
      caps.setDeviceVariation(variation);

      driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), caps);
      driver.get("http://ebay.ch");
      RemoteIOSDriver d = IOSDriverAugmenter.getIOSDriver(driver);

      dumpCapabilities(device, variation, d);
      for (Orientation o : Orientation.values()) {
        try {
          d.rotate(o);
          // status
          // capabilities
          dumpElementTree(device, variation, o, d);
        } catch (WebDriverException e) {
          if (!e.getMessage()
              .contains("The orientation specified is not supported by the application")) {
            throw e;
          }
        }
      }
    } finally {
      if (driver != null) {
        driver.quit();
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.