![JAR search and dependency download from the Maven repository](/logo.png)
com.clarolab.selenium.pages.webservice.EndpointBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pages-framework Show documentation
Show all versions of pages-framework Show documentation
Framework for automated testing using Selenium. Provides easy configuration of WebDrivers with BrowserFactory. Provides a Page abstraction.
The newest version!
package com.clarolab.selenium.pages.webservice;
public class EndpointBuilder {
public static String uri(String host, String root, String relativePath) {
String absolutePath = buildAbsolutePath(root, relativePath);
return buildUri(host, absolutePath);
}
private static String buildUri(String host, String absolutePath) {
while (host.endsWith("/") && host.length() > 1) {
host = host.substring(0, host.length() - 1);
}
return host + absolutePath;
}
private static String buildAbsolutePath(String root, String relativePath) {
String separator = root.endsWith("/") ? "" : "/";
return root + separator + relativePath;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy