本文整理汇总了Java中org.openqa.selenium.remote.html5.RemoteLocationContext类的典型用法代码示例。如果您正苦于以下问题:Java RemoteLocationContext类的具体用法?Java RemoteLocationContext怎么用?Java RemoteLocationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteLocationContext类属于org.openqa.selenium.remote.html5包,在下文中一共展示了RemoteLocationContext类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AppiumDriver
import org.openqa.selenium.remote.html5.RemoteLocationContext; //导入依赖的package包/类
/**
* @param executor is an instance of {@link org.openqa.selenium.remote.HttpCommandExecutor}
* or class that extends it. Default commands or another vendor-specific
* commands may be specified there.
* @param capabilities take a look
* at {@link org.openqa.selenium.Capabilities}
* @param converterClazz is an instance of a class that extends
* {@link org.openqa.selenium.remote.internal.JsonToWebElementConverter}. It converts
* JSON response to an instance of
* {@link org.openqa.selenium.WebElement}
*/
protected AppiumDriver(HttpCommandExecutor executor, Capabilities capabilities,
Class<? extends JsonToWebElementConverter> converterClazz) {
super(executor, capabilities);
this.executeMethod = new AppiumExecutionMethod(this);
locationContext = new RemoteLocationContext(executeMethod);
super.setErrorHandler(errorHandler);
this.remoteAddress = executor.getAddressOfRemoteServer();
try {
Constructor<? extends JsonToWebElementConverter> constructor =
converterClazz.getConstructor(RemoteWebDriver.class);
this.setElementConverter(constructor.newInstance(this));
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException
| InvocationTargetException e) {
throw new RuntimeException(e);
}
}
示例2: MyChromeDriver
import org.openqa.selenium.remote.html5.RemoteLocationContext; //导入依赖的package包/类
public MyChromeDriver(ChromeDriverService service, Capabilities capabilities) {
super(new MyChromeDriverCommandExecutor(service), capabilities);
this.locationContext = new RemoteLocationContext(this.getExecuteMethod());
this.webStorage = new RemoteWebStorage(this.getExecuteMethod());
this.touchScreen = new RemoteTouchScreen(this.getExecuteMethod());
this.networkConnection = new RemoteNetworkConnection(this.getExecuteMethod());
}
示例3: getLocationContext
import org.openqa.selenium.remote.html5.RemoteLocationContext; //导入依赖的package包/类
static LocationContext getLocationContext(WebDriver driver) {
return convert(driver, LocationContext.class, CapabilityType.SUPPORTS_LOCATION_CONTEXT,
RemoteLocationContext.class);
}