use of com.liveperson.ephemerals.deploy.DeploymentEndpoints in project ephemerals by LivePersonInc.
the class AppiumAndroidEphemeral method createObject.
@Override
protected AndroidDriver createObject(DeploymentEndpoints endpoints) {
URL remoteWebDriverUrl = null;
for (DeploymentEndpoints.Endpoint endpoint : endpoints.list()) {
if (endpoint.getName().equals("appium-server")) {
String host = endpoint.getHost();
int port = endpoint.getPort();
try {
remoteWebDriverUrl = new URL(String.format("http://%s:%s/%s", host, port, "/wd/hub"));
logger.info("RemoteWebDriver URL {}", remoteWebDriverUrl);
} catch (MalformedURLException e) {
return null;
}
}
}
return new AndroidDriver(remoteWebDriverUrl, desiredCapabilities);
}
Aggregations