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

项目: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 ApplicationCache cache( WebDriver driver )
{
    return null;
}
项目:grid-refactor-remote-server    文件:Utils.java   
static ApplicationCache getApplicationCache(WebDriver driver) {
  return convert(driver, ApplicationCache.class, CapabilityType.SUPPORTS_APPLICATION_CACHE,
                 RemoteApplicationCache.class);
}