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

com.pega.uiframework.builder.SeleniumGridUrlBuilder Maven / Gradle / Ivy

The newest version!
package com.pega.uiframework.builder;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * Created by mekak2 on 3/29/17.
 */

/**
 * Build the Selenium GRID url.
 */
public class SeleniumGridUrlBuilder extends GridUrlBuilder
{
    private String url = "";

    @Override
    public GridUrlBuilder addProtocol(Protocol protocol)
    {
        url += protocol.getProtocol() + "://";
        return this;
    }

    @Override
    public GridUrlBuilder addSeleniumHubHost(String host)
    {
        url += host + ":";
        return this;
    }

    @Override
    public GridUrlBuilder addSeleniumHubPort(int port)
    {
        url += port;
        return this;
    }

    /**
     * Build the GRID url.
     */
    @Override
    public URL build() throws MalformedURLException
    {
        return new URL(url + "/wd/hub");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy