io.appium.java_client.AppiumExecutionMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java client for Appium Mobile Webdriver
package io.appium.java_client;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.remote.ExecuteMethod;
import org.openqa.selenium.remote.Response;
import java.util.Map;
public class AppiumExecutionMethod implements ExecuteMethod {
private final AppiumDriver driver;
public AppiumExecutionMethod(AppiumDriver driver) {
this.driver = driver;
}
public Object execute(String commandName, Map parameters) {
Response response;
if (parameters == null || parameters.isEmpty()) {
response = driver.execute(commandName, ImmutableMap.of());
} else {
response = driver.execute(commandName, parameters);
}
return response.getValue();
}
}