Java, Selenium, Selenium grid, Testing, TestNG, Web Automation

FAILED CONFIGURATION: @BeforeMethod setUp org.openqa.selenium. WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities

[TestNG] Running:

org.openqa.selenium.WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}]
Command duration or timeout: 200 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ksehgal', ip: '', 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at org.openqa.selenium.remote.ErrorHandler.createThrowable(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.startSession(

SKIPPED: windowsTest

Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1

[TestNG] Time taken by org.testng.reporters.XMLReporter@6beb8639: 16 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 6 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@1a0c3b27: 44 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@21d195ca: 4 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@390f8c82: 23 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@6ba52c90: 7 ms

How I encountered this error

  • Step1 Start selenium grid hub
 java -jar selenium-server-standalone-2.41.0.jar -role hub

  • Step2 Start executing test scripts.
  • Step3 You will get the above error.


  • You does not have any node in the selenium grid whole set up.
  • Start command prompt from your local or some machine and execute this command
 java -jar selenium-server-standalone-2.41.0.jar -role node -hub http://<hub-ip>:<hub-port>/grid/register

  • Now run your tests again.
  • They should run fine.


  1. To run your test scripts on a selenium grid network, you require minimum 1 hub and 1 node. So as to run your test scripts.
  2. Hub is responsible to take care of navigating your test scripts to the desired environment combination. And node will actually run your test scripts.

5 thoughts on “FAILED CONFIGURATION: @BeforeMethod setUp org.openqa.selenium. WebDriverException: Error forwarding the new session Empty pool of VM for setup Capabilities”

  1. I am very new to automation testing :

    package com.test;

    import org.testng.annotations.BeforeMethod;
    import org.testng.annotations.Test;



    import java.util.concurrent.TimeUnit;

    //import org.apache.commons.exec.CommandLine;
    //import org.apache.commons.exec.DefaultExecuteResultHandler;
    //import org.apache.commons.exec.DefaultExecutor;
    //import org.apache.commons.exec.ExecuteException;
    //import org.openqa.selenium.By;
    import org.openqa.selenium.remote.DesiredCapabilities;
    //import org.openqa.selenium.remote.RemoteWebDriver;
    //import org.testng.annotations.AfterMethod;
    import org.testng.annotations.BeforeMethod;
    //import org.testng.annotations.Test;
    //import org.openqa.selenium.WebDriver;

    public class AppiumTest {

    private AndroidDriver driver;

    //public class SetupAndroidAppium{

    //static DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
    // static DefaultExecutor executor = new DefaultExecutor();
    public void setUp() throws MalformedURLException {
    File classpathRoot = new File(System.getProperty(“user,dir “));

    File appDir = new File(classpathRoot, “Application”);

    File app = new File(appDir,”WestJet-qa-debug-unaligned__28_.apk”);

    DesiredCapabilities capabilities = new DesiredCapabilities();



    driver = new AndroidDriver(new URL(“”),capabilities);
    public void launchEmulator() throws Exception{

    When I try to run this I get above Error message but I could not follow you in above example ?

    Please can you help me understand this ?


    1. HI Jig,
      As far as I understood you are trying to create an android test file in java, but I am doing it for selenium only, not for Appium. May be an updation of latest version in your jars might help.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s