Java 类org.openqa.selenium.remote.internal.JsonToWebElementConverter 实例源码

项目:menggeqa    文件:AppiumDriver.java   
/**
 * @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);
    }
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(URL remoteAddress, Capabilities desiredCapabilities,
    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(new AppiumCommandExecutor(MobileCommand.commandRepository, remoteAddress),
        desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(URL remoteAddress, HttpClient.Factory httpClientFactory,
    Capabilities desiredCapabilities,
                    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(new AppiumCommandExecutor(MobileCommand.commandRepository, remoteAddress,
        httpClientFactory), desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(AppiumDriverLocalService service, Capabilities desiredCapabilities,
    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(new AppiumCommandExecutor(MobileCommand.commandRepository, service),
        desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(AppiumDriverLocalService service, HttpClient.Factory httpClientFactory,
    Capabilities desiredCapabilities,
                    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(new AppiumCommandExecutor(MobileCommand.commandRepository, service, httpClientFactory),
        desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(AppiumServiceBuilder builder, Capabilities desiredCapabilities,
    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(builder.build(), desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(AppiumServiceBuilder builder, HttpClient.Factory httpClientFactory,
    Capabilities desiredCapabilities,
                    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(builder.build(), httpClientFactory, desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(HttpClient.Factory httpClientFactory, Capabilities desiredCapabilities,
    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(AppiumDriverLocalService.buildDefaultService(), httpClientFactory,
        desiredCapabilities, converterClazz);
}
项目:menggeqa    文件:AppiumDriver.java   
public AppiumDriver(Capabilities desiredCapabilities,
    Class<? extends JsonToWebElementConverter> converterClazz) {
    this(AppiumDriverLocalService.buildDefaultService(), desiredCapabilities, converterClazz);
}
项目:hsac-fitnesse-fixtures    文件:DriverManager.java   
protected void setElementConverter(RemoteWebDriver d) {
    JsonToWebElementConverter converter = createElementConverter(d);
    Environment.getInstance().getReflectionHelper().setField(d, "converter", converter);
}
项目:hsac-fitnesse-fixtures    文件:DriverManager.java   
protected JsonToWebElementConverter createElementConverter(RemoteWebDriver d) {
    return new WebElementConverter(d);
}