All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarolab.selenium.pages.webservice.EndpointBuilder Maven / Gradle / Ivy

Go to download

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