
com.appium.plugin.PluginCliRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AppiumTestDistribution Show documentation
Show all versions of AppiumTestDistribution Show documentation
A tool run Android and iOS test in parallel across devices
package com.appium.plugin;
import com.appium.manager.AppiumServerManager;
import com.appium.utils.Api;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.net.URL;
public class PluginCliRequest {
Api api;
public PluginCliRequest() {
api = new Api();
}
public PluginClI getCliArgs() throws IOException {
AppiumServerManager appiumServerManager = new AppiumServerManager();
String remoteWDHubIP = appiumServerManager.getRemoteWDHubIP();
URL url = new URL(remoteWDHubIP);
String response = api.getResponse(url.getProtocol() + "://" + url.getHost()
+ ":" + url.getPort() + "/device-farm/api/cliArgs");
final PluginClI[] pluginClIS = new ObjectMapper().readValue(response, PluginClI[].class);
return pluginClIS[0];
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy