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();
}
}
}