rama-chitturi / MySolutionHub

0 stars 0 forks source link

Implementing Selenium Grid #5

Open rama-chitturi opened 3 years ago

rama-chitturi commented 3 years ago

To config Selenium Grid. Please find #4.

To implement Selenium Grid on Hub to trigger Node

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

import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver;

public class GridSetup {

static WebDriver driver;
static String appURL, nodeURL;
public void setup() throws MalformedURLException
{
    appURL = "http://app.com";
    nodeURL = "http://eeee.fff.gg.hh:4456/wd/hub";

    DesiredCapabilities dCap = DesiredCapabilities.chrome();
    dCap.setBrowserName("chrome");
    dCap.setPlatform(Platform.WIN10);

    driver = new RemoteWebDriver(new URL(nodeURL), dCap);
}

}