How can I run Grid up and running

460 Views Asked by At

Is it possible to run the hub and nodes in Selenium Grid through Java/Selenium code? In an example provided by @Boni Garcia, there is GridLauncherV3 but this is not working with Selenium-jupiter version 3.2.1. Can you please help?

    // Start hub

    GridLauncherV3.main(new String[] { "-role", "hub", "-port", "4444" });

    // Register Chrome in hub
    WebDriverManager.chromedriver().setup();
    GridLauncherV3.main(new String[] { "-role", "node", "-hub",
            "http://localhost:4444/grid/register", "-browser",
            "browserName=chrome", "-port", "5555" });
    '''
1

There are 1 best solutions below

1
Boni García On

This example is working at the time of this writing, I have just double checked. Just notice it is disabled, an so you need to remove the @Disabled annotation to execute it.