com.testvagrant.optimus.core.remote.RemoteUrlBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optimus-lite Show documentation
Show all versions of optimus-lite Show documentation
Optimus Lite API to manage test devices and create appium driver based on platform
package com.testvagrant.optimus.core.remote;
import com.testvagrant.optimus.core.models.CloudConfig;
import java.net.URL;
public class RemoteUrlBuilder {
public static URL build(CloudConfig cloudConfig) {
try {
String urlString;
if(!cloudConfig.getUrl().isEmpty()) {
urlString = cloudConfig.getUrl();
} else {
urlString =
String.format(
"%s://%s:%s@%s/wd/hub",
cloudConfig.getProtocol(),cloudConfig.getUsername(), cloudConfig.getAccessKey(), cloudConfig.getHub());
}
return new URL(urlString);
} catch (Exception ex) {
throw new RuntimeException(ex.getMessage());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy