Java 类org.openqa.selenium.html5.LocationContext 实例源码

项目: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;
}
项目:cucumber-framework-java    文件:WebDriverUtils.java   
public static LocationContext location( WebDriver driver )
{
    return null;
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public Location location() {
  return ((LocationContext) super.getWrappedDriver()).location();
}
项目:bobcat    文件:WebDriverWrapper.java   
@Override
public void setLocation(Location arg0) {
  ((LocationContext) super.getWrappedDriver()).setLocation(arg0);
}
项目:grid-refactor-remote-server    文件:Utils.java   
static LocationContext getLocationContext(WebDriver driver) {
  return convert(driver, LocationContext.class, CapabilityType.SUPPORTS_LOCATION_CONTEXT,
      RemoteLocationContext.class);
}