Exception while trying to run test using WebDriver Grid 2

26 views
Skip to first unread message

fmtjatt

unread,
Feb 18, 2015, 1:10:07 PM2/18/15
to webd...@googlegroups.com
Hi All,

I have been using Standalone Webdriver for a while now but would like to switch to using Grid because our test suite now takes 3 hours and we want to cut that time in half. However, I'm running into following exception when I try to run the test using Grid 2:

org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities [{platform=2, ensureCleanSession=true, browserName=internet explorer, version=}] 

My Setup:

  • VM  - Windows 7
    • Grid Hub and Node running on it same VM with defaults
  • Executing test from Eclipse using TestNG
WebDriver Code:

       
@BeforeMethod(alwaysRun=true)
 
@Parameters({"environment", "browser"})
 
public void setup(String environment, String browser) throws Exception {
 

 
//Open browser based on what is being passed as parameter in testng.xml file
 
switch (browser) {
 
case "IE":
 
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
 capabilities
.setCapability("platform", Platform.WINDOWS);
 driver
= new RemoteWebDriver(new URL("http://192.168.11.123:4444/wd/hub"), capabilities);
 
break;
}

Any help is much appreciated!!

Thanks,
Fmtjatt

fmtjatt

unread,
Feb 18, 2015, 2:05:31 PM2/18/15
to webd...@googlegroups.com
This issue has been resolved. I made two changes: 

1. Removed the reference to platform capability from my code :
capabilities.setCapability("platform", Platform.WINDOWS);

2. I started the node and passed the path to my ie driver like this :
-Dwebdriver.ie.driver=C:\automation\EPMS_Trunk\InternetExplorerDriver\IEDriverServer.exe

Hope this helps anyone who runs into this issue future.

Thanks!
Reply all
Reply to author
Forward
0 new messages