org.openqa.selenium.html5.LocationContext Java Examples

The following examples show how to use org.openqa.selenium.html5.LocationContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultSession.java    From selenium with Apache License 2.0 6 votes vote down vote up
private Map<String, Object> 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 Rotatable) {
    caps.setCapability(CapabilityType.ROTATABLE, true);
  }
  if (instance instanceof HasTouchScreen) {
    caps.setCapability(CapabilityType.HAS_TOUCHSCREEN, true);
  }
  return caps.asMap();
}
 
Example #2
Source File: WebDriverWrapper.java    From bobcat with Apache License 2.0 4 votes vote down vote up
@Override
public Location location() {
  return ((LocationContext) super.getWrappedDriver()).location();
}
 
Example #3
Source File: WebDriverWrapper.java    From bobcat with Apache License 2.0 4 votes vote down vote up
@Override
public void setLocation(Location arg0) {
  ((LocationContext) super.getWrappedDriver()).setLocation(arg0);
}
 
Example #4
Source File: AddLocationContext.java    From selenium with Apache License 2.0 4 votes vote down vote up
@Override
public Class<LocationContext> getDescribedInterface() {
  return LocationContext.class;
}
 
Example #5
Source File: AddLocationContext.java    From selenium with Apache License 2.0 4 votes vote down vote up
@Override
public LocationContext getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
  return new RemoteLocationContext(executeMethod);
}
 
Example #6
Source File: Utils.java    From selenium with Apache License 2.0 4 votes vote down vote up
static LocationContext getLocationContext(WebDriver driver) {
  return convert(driver, LocationContext.class, CapabilityType.SUPPORTS_LOCATION_CONTEXT,
      RemoteLocationContext.class);
}