本文整理汇总了Java中org.openqa.selenium.remote.internal.JsonToWebElementConverter类的典型用法代码示例。如果您正苦于以下问题:Java JsonToWebElementConverter类的具体用法?Java JsonToWebElementConverter怎么用?Java JsonToWebElementConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsonToWebElementConverter类属于org.openqa.selenium.remote.internal包,在下文中一共展示了JsonToWebElementConverter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AppiumDriver
import org.openqa.selenium.remote.internal.JsonToWebElementConverter; //导入依赖的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: setElementConverter
import org.openqa.selenium.remote.internal.JsonToWebElementConverter; //导入依赖的package包/类
protected void setElementConverter(RemoteWebDriver d) {
JsonToWebElementConverter converter = createElementConverter(d);
Environment.getInstance().getReflectionHelper().setField(d, "converter", converter);
}
示例3: createElementConverter
import org.openqa.selenium.remote.internal.JsonToWebElementConverter; //导入依赖的package包/类
protected JsonToWebElementConverter createElementConverter(RemoteWebDriver d) {
return new WebElementConverter(d);
}