1

I am using : java:1.8 Selenium: 3.141.59 jar Geco driver version: 0.25.0 Firefox version : 69.0.1

Below is the executable.bat file detail:

start java -jar C:/eclipse-workspace/Selenium_Grid/Config/selenium-server-standalone-3.141.59.jar -role hub

start java -Dwebdriver.chrome.driver=D:/Selenium/chromedriver_win32/chromedriver.exe -jar C:/eclipse-workspace/Selenium_Grid/Config/selenium-server-standalone-3.141.59.jar -role node -hub http://localhost:4444/grid/register -port 5558 -maxSession 5 -browser browserName=chrome,maxInstances=10 

start java -Dwebdriver.gecko.driver=D:/Selenium/geckodriver-v0.25.0-win64/geckodriver.exe -jar C:/eclipse-workspace/Selenium_Grid/Config/selenium-server-standalone-3.141.59.jar -role node -hub http://localhost:4444/grid/register -port 5559 -maxSession 5

Configuration of Grid Hub and node

Below is the code :

public static RemoteWebDriver getBrowserDriver(final String browser)
        throws MalformedURLException {
    return new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),
            getBrowserCapabilities(browser));
}

private static DesiredCapabilities getBrowserCapabilities(
        final String browserType) throws MalformedURLException {
    switch (browserType.toLowerCase()) {
    case "firefox":
        System.out.println("Opening firefox driver");
        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
        capabilities.setBrowserName("firefox");
        capabilities.setPlatform(Platform.WIN10);       
        return capabilities;
    }
}

On running code getting below exception log :

org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities {acceptInsecureCerts: true, browserName: firefox, marionette: true, platform: WIN10, version: } Command duration or timeout: 801 milliseconds Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'GP-PIN-IS04', ip: '192.168.250.72', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221' Driver info: driver.version: RemoteWebDriver Caused by: org.openqa.grid.common.exception.GridException: Error forwarding the new session Empty pool of VM for setup Capabilities {acceptInsecureCerts: true, browserName: firefox,

3
  • Please edit your question, and add a screenshot of the Grid console so that we know what is the browser flavors that are getting registered (dont forget to switch to the configuration tab of the grid console, when taking the screenshot) Commented Sep 20, 2019 at 4:27
  • Thank Krishnan for response, I have attached screen shot as guided, please let me know if anything else needed from my end. Commented Sep 20, 2019 at 5:58
  • 1
    Update : Issue was resolved by after Firefox update version : 69.0.2, also on using firefoxoptions and merging the capabilities, below is the example :DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setBrowserName("firefox"); capabilities.setPlatform(Platform.WINDOWS); FirefoxOptions options= new FirefoxOptions(); options.merge(capabilities); Commented Oct 11, 2019 at 3:21

1 Answer 1

1

So your error says "Error forwarding the new session Empty pool of VM for setup Capabilities" which means it is looking for a node that matches the capabilities you asked for when creating the remote driver, but it cannot find one. In the line that is starting your geckodriver, you are not specifying a browser like you are for the chrome one. Probably it would be easier to create a node config file and pass it in when starting the node like this:

java -Dwebdirver.gecko.driver="D:/Selenium/geckodriver-v0.25.0-win64/geckodriver.exe" -jar selenium-server-standalone-3.8.1.jar -role node -hub "http://localhost:4444/grid/register/" -port 5559 -nodeConfig config.json

Here is what the config file for your firefox node could look like:

 {
 "capabilities": [
   {
     "browserName": "firefox",
     "platform": "WIN10",
     "maxInstances": 5
   }      
 ],
 "hub": "http://<hub ip>:<hub port>"
 }
Sign up to request clarification or add additional context in comments.

4 Comments

Thanks Shannon for reply, but still getting the same error even after using config way.
Maybe try updating your grid jar? Looks like you are using a pretty old one.
I am using 3.141.59 selenium server jar,also gecko driver 0.25.0 version, if these are the older one kindly guide me to latest jar download link.
Hi Keshav, here is a link to download the latest grid jars. I am using 3.8.1 but they have also come out with Selenium 4 selenium-release.storage.googleapis.com/index.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.