Java 类org.openqa.selenium.Rotatable 实例源码

项目:grid-refactor-remote-server    文件:DefaultSession.java   
private DesiredCapabilities getDescription(WebDriver instance, Capabilities capabilities) {
  DesiredCapabilities caps = new DesiredCapabilities(capabilities.asMap());
  caps.setJavascriptEnabled(instance instanceof JavascriptExecutor);
  if (instance instanceof TakesScreenshot) {
    caps.setCapability(CapabilityType.TAKES_SCREENSHOT, true);
  }
  if (instance instanceof LocationContext) {
    caps.setCapability(CapabilityType.SUPPORTS_LOCATION_CONTEXT, true);
  }
  if (instance instanceof ApplicationCache) {
    caps.setCapability(CapabilityType.SUPPORTS_APPLICATION_CACHE, true);
  }
  if (instance instanceof NetworkConnection) {
    caps.setCapability(CapabilityType.SUPPORTS_NETWORK_CONNECTION, true);
  }
  if (instance instanceof WebStorage) {
    caps.setCapability(CapabilityType.SUPPORTS_WEB_STORAGE, true);
  }
  if (instance instanceof FindsByCssSelector) {
    caps.setCapability(CapabilityType.SUPPORTS_FINDING_BY_CSS, true);
  }
  if (instance instanceof Rotatable) {
    caps.setCapability(CapabilityType.ROTATABLE, true);
  }
  if (instance instanceof HasTouchScreen) {
    caps.setCapability(CapabilityType.HAS_TOUCHSCREEN, true);
  }
  return caps;
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public ScreenOrientation getOrientation() {
  return ((Rotatable) super.getWrappedDriver()).getOrientation();
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public void rotate(DeviceRotation deviceRotation) {
  ((Rotatable) super.getWrappedDriver()).rotate(deviceRotation);
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public DeviceRotation rotation() {
  return ((Rotatable) super.getWrappedDriver()).rotation();
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public void rotate(ScreenOrientation screenOrientation) {
  ((Rotatable) super.getWrappedDriver()).rotate(screenOrientation);
}
项目:grid-refactor-remote-server    文件:Rotate.java   
@Override
public Void call() throws Exception {
  ((Rotatable) getUnwrappedDriver()).rotate(orientation);
  return null;
}
项目:grid-refactor-remote-server    文件:GetScreenOrientation.java   
@Override
public ScreenOrientation call() throws Exception {
  return ((Rotatable) getUnwrappedDriver()).getOrientation();
}