Error forwarding the new session ... cannot find IE 10

1,276 views
Skip to first unread message

Robert

unread,
Mar 20, 2014, 8:42:01 PM3/20/14
to webd...@googlegroups.com
I'm trying to run a test remotely on the Selenium Grid using Internet Explorer 10.  I've checked the node and verified that the IEDriverServer.exe is located in the PATH variable.  

Is Selenium version 2.33.0 compatible with IE 10?

Error forwarding the new session cannot find : {platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=10}
Command duration or timeout: 806 milliseconds  Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time:'2013-05-22 12:00:17'

Krishnan Mahadevan

unread,
Mar 21, 2014, 8:47:30 AM3/21/14
to webdriver
The error message [Error forwarding the new session] is the Grid's way of telling you that you asked for a node which has "Internet Explorer" running on "WINDOWS" with its version set as "10".

The Grid is saying it doesnt have any nodes registered to it, that has this capability. THis error doesnt have anything to do with the actual version of the browser.

For more understanding I would recommend that you please go through my blog post : rationaleemotions.wordpress.com/2012/01/23/setting-up-grid2-and-working-with-it/







Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.

Robert

unread,
Mar 21, 2014, 10:55:55 AM3/21/14
to webd...@googlegroups.com
Krishnan,

Thanks for the information and the link to your blog post.  However, when I checked the setting on the grid for this particular node, here is what is contained in our json file

{
  "capabilities":
      [
        {
 "platform": "WINDOWS",
          "browserName": "firefox",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
 "platform": "WINDOWS",
          "browserName": "chrome",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
 "platform": "WINDOWS",
          "browserName": "internet explorer",
          "browserVersion": "10",
          "maxInstances": 1,
          "seleniumProtocol": "WebDriver"
        }
      ],
  "configuration":
  {
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "maxSession": 5,
    "port": 5555,
    "host": ip,
    "register": true,
    "registerCycle": 5000,
    "hubPort": 4444,
    "hubHost": ip
  }
}


and attached is a screen shot of the what the grid is reporting as registered

So, I'm not sure what is wrong here??  It appears that everything is in place.
Screenshot_of_Node_with_ IE10_registered.png

Krishnan Mahadevan

unread,
Mar 21, 2014, 10:07:37 PM3/21/14
to webd...@googlegroups.com
Robert
That's weird. Can you please show us how you are instantiating the RemoteWebDriver ?

Also do you see the same problem with 2.40 as well ? [ I am pretty sure I have seen this error only when a node isn't available that matches the requested capabilities ]

iSent. iPhone. iReget. iThumbs.iTypos!
<Screenshot_of_Node_with_ IE10_registered.png>

darrell

unread,
Mar 22, 2014, 9:15:29 AM3/22/14
to webd...@googlegroups.com
Can you share your code to initialize your RemoteWebDriver? Maybe look at the stacktrace associated with this, set a breakpoint at the deepest point within your code then when it stops there, examine the variables at different points in the stack and see if anything jumps out at you.

Additionally, is the IEDriverServer.exe in the PATH for the user which is running the node? It could be that it is in the path for you but the user running the node (selenium jar file) is different and therefore does not have the IEDriverServer.exe. Finally, could there be multiple IEDriverServer.exe on the PATH and it is finding the wrong version first.

Darrell

Robert

unread,
Mar 22, 2014, 8:49:23 PM3/22/14
to webd...@googlegroups.com
Here is how I'm initializing the driver

    private WebDriver loadInternetExplorerDriver() throws MalformedURLException {
        // set the REQUIRED system property to locate the IEDriver
        System.setProperty("webdriver.ie.driver", "C:/twds/segrid2/IEDriverServer.exe");

        DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
        capabilities.setPlatform(Platform.WINDOWS);
        if (browserVersion != null) {
            capabilities.setVersion(browserVersion);
        }

        if (isTestRemote) {
            return new Augmenter().augment(new RemoteWebDriver(new URL(remoteHub), capabilities));
        } else {
            return new InternetExplorerDriver(capabilities);
        }
  } 
    

I will try using Se 2.40.0 and see if it makes a difference.  The IE driver is in the PATH, but I'll verify that it is running under the correct user.  It's odd because, we also have the Chrome driver installed for the same user at the same path, and there are no issues with that driver.

Richard Lavoie

unread,
Mar 22, 2014, 8:54:05 PM3/22/14
to webd...@googlegroups.com
you need to set the webdriver.ie.driver system property on the node side on the commandline with a -D on the commandline when you launch the node, doing so locally won't work when you launch a remote webdriver session.

Richard Lavoie

darrell

unread,
Mar 23, 2014, 8:18:25 AM3/23/14
to webd...@googlegroups.com
As DarkRift has pointed out, using the System.setProperty to set the webdriver.ie.driver will set it so running IE on the same machine as we the Selenium tests are run will work. A typical set up for me is:


On the win7ie10node.domain.com machine I have a folder with everything in it. e.g.
  • C:\twds\segrid2\IEDriverServer.exe
  • C:\twds\segrid2\ChromeDriver.exe
  • C:\twds\segrid2\win7ie10.json
  • C:\twds\segrid2\startup.cmd
  • C:\twds\segrid2\selenium-server-standalone-2.39.0.jar
The win7ie10.json has all the configuration for the browsers on that node. The startup.cmd file will have something like:

set PATH=C:\twds\segrid2;%PATH%

and at the bottom of the script will be the command to run the selenium jar file as a node using the json file. The end result will be that the jar file will find the chrome and IE executables in the path. Even if there are multiple copies of IEDriverServer.exe on the machine, it will find the one beside the selenium jar file first. This eliminates the chance that someone accidentally put an old version of IEDriverServer.exe in somewhere like C:\Windows\System32.

I can also use Puppet or Chef to update the contents of the folder when I want to update from 2.39.0 t0 2.40.0, for example.

Basically, I see maintaining the environment (version of browsers, version of selenium, node configuration, etc.) as part of operations and not part of development. So I will use operations techniques to maintain the environment rather than coding it into my scripts. This also means that if I need a new browser I update the browser and all the necessary selenium files as part of the environment rather than updating the browser as environmental and development. The code should not change because I switch from 2.39.0 to 2.40.0.

Robert

unread,
Mar 24, 2014, 12:45:21 PM3/24/14
to webd...@googlegroups.com
Thanks for the feedback DarkRift and Darrell.

@Darrell,

What you've described is essentially how we have things setup, with the exception of the PATH setting within our startup batch file -- which I just added to our batch file.  I have the .exe files located within the C:\twds\segrid2 directory, which is in the PATH.  But here is the thing, I've narrowed the issue down to the following bit of code

        if (browserVersion != null) {
            capabilities.setVersion(browserVersion);
        }

        new Augmenter().augment(new RemoteWebDriver(new URL(remoteHub), capabilities));

When I pass a value of '10' for the browserVersion, then I receive the following error:

Error forwarding the new session cannot find : {platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=10}

Yet, when I do not include a browser version, IE runs just fine on the grid.  Is this some sort of bug associated with Selenium 2.33.0?

Krishnan Mahadevan

unread,
Mar 26, 2014, 4:14:12 AM3/26/14
to webdriver
Robert,
Can you please try upgrading to Selenium 2.40.0 and see if this problem persists ?

Also what happens when you refactor
        if (isTestRemote) {
            return new Augmenter().augment(new RemoteWebDriver(new URL(remoteHub), capabilities));
        } else {
            return new InternetExplorerDriver(capabilities);
        }

to 

        if (isTestRemote) {
            return new RemoteWebDriver(new URL(remoteHub), capabilities);
        } else {
            return new InternetExplorerDriver(capabilities);
        }

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


darrell

unread,
Mar 26, 2014, 9:47:34 AM3/26/14
to webd...@googlegroups.com
Hmm, the error tells me that RemoteWebDriver is requesting, from the hub, a node with the settings for:

  "capabilities":
      [
        {
          "platform": "WINDOWS",
          "browserName": "internet explorer",
          "seleniumProtocol": "WebDriver",
          "version": "10"
        }
      ]

Are you running the node with command line settings or a json file? If you are using a json file, do you have the above entry in the capabilities key? If this key is not part of the node configuration, when it registers with the hub it will refuse connections which REQUIRE "version" : "10". This is one problem with the nodes in a grid. It does not matter what is ACTUALLY on the node. You have to make sure the node configuration matches what is on the node. I can actually tell the node that it is using "version" : "77" and it will tell the hub that it supports version=77.

So if you have no configuration settings for the node I believe the default is no "version" set. So if you ask for version=10 it will tell you there is no node with that configuration.

Robert

unread,
Mar 27, 2014, 12:11:13 PM3/27/14
to webd...@googlegroups.com
Darrell,

Well, it looks like the answer was staring me right in the face.  We are using a JSON file to set up each node's capabilities, and after reviewing your example, it hit me where I had gone wrong.  I was using "browserVersion" instead of "version" in my JSON file

        {
  "platform": "WINDOWS",
          "browserName": "internet explorer",
          "browserVersion": "10",
          "maxInstances": 1,
          "seleniumProtocol": "WebDriver"
        }

Once I altered that to "version", everything worked as expected!!  Thanks for your help.

darrell

unread,
Mar 28, 2014, 8:16:59 AM3/28/14
to webd...@googlegroups.com
No problem Robert. This the reason I strongly believe in pair programming. I have quite a few years experience at this time but I still have junior developers pointing out mistakes I make. It also helps now that I'm going a little senile. :)
Reply all
Reply to author
Forward
0 new messages