how to run Selenium grid in IE

84 views
Skip to the first unread message

Jagatheswaran Selvakumar

unread,
17 Feb 2013, 11:59:48 pm17/2/13
to seleniu...@googlegroups.com
Hi
 please help me how to run selenium grid testcase in Internet explorer ...

i want steps to run testcase
I am using IE8 and windowsXP

--
Thanks and Regards,
Jagatheswaran S | Photon | QA Engineer |
DLF IT Park, Chennai,

Krishnan Mahadevan

unread,
18 Feb 2013, 12:38:33 am18/2/13
to seleniu...@googlegroups.com
Read here [1],[2] and then here [3]



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/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:05:46 am18/2/13
to seleniu...@googlegroups.com
give solution for this
code i used

 <test name="VerifyWelcomePageOnFirefox" junit="false"
        preserve-order="true">
        <parameter name="browser" value="iexplore" />
        <parameter name="platform" value="WINDOWS" />
        <classes>
            <class name="com.testcases.WelcomePageTestCase" />
        </classes>
    </test>


selectedBrowser.equalsIgnoreCase(iexplore)) {
            log.info("---------------***LAUNCHING INTERNET EXPLORE***-----------");
            driver = new InternetExplorerDriver();
            capabilities = new DesiredCapabilities();
            capabilities.setBrowserName("iexplore");
getting this  error:
INFO: ---------------***LAUNCHING INTERNET EXPLORE***-----------
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://code.google.com/p/selenium/downloads/list
    at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105)
    at org.openqa.selenium.ie.InternetExplorerDriverService.access$1(InternetExplorerDriverService.java:1)
    at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.build(InternetExplorerDriverService.java:166)
    at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:109)
    at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetExplorerDriver.java:102)
    at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:49)
    at com.photon.phresco.Screens.BaseScreen.instantiateBrowser(BaseScreen.java:90)
    at com..Screens.BaseScreen.<init>(BaseScreen.java:65)
    at com..Screens.AbstractScreen.<init>(AbstractScreen.java:20)
    at com.Screens.WelcomeScreen.<init>(WelcomeScreen.java:14)
    at com.testcases.WelcomePageTestCase.setUp(WelcomePageTestCase.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
    at org.testng.TestRunner.beforeRun(TestRunner.java:641)
    at org.testng.TestRunner.run(TestRunner.java:609)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$0(SuiteRunner.java:333)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[Invoker 13799530] Invoking com.photon.phresco.testcases.WelcomePageTestCase.testToVerifyTextNotPresent
---------testToCreateAccount()-------------
java.lang.NullPointerException
    at com.photon.phresco.testcases.WelcomePageTestCase.testToVerifyTextNotPresent(WelcomePageTestCase.java:97)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$0(SuiteRunner.java:333)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[Invoker 13799530] Invoking com.photon.phresco.testcases.WelcomePageTestCase.testToVerifyTextPresent
---------testToCreateAccount()-------------
java.lang.NullPointerException
    at com.photon.phresco.testcases.WelcomePageTestCase.testToVerifyTextPresent(WelcomePageTestCase.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$0(SuiteRunner.java:333)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[Invoker 13799530] Invoking @AfterTest WelcomePageTestCase.tearDown()[pri:0, instance:com.photon.phresco.testcases.WelcomePageTestCase@fc9944]
Failed to invoke configuration method com.photon.phresco.testcases.WelcomePageTestCase.tearDown:null
===== Invoked methods
    WelcomePageTestCase.testToVerifyTextNotPresent()[pri:0, instance:com.photon.phresco.testcases.WelcomePageTestCase@fc9944] 16554308
    WelcomePageTestCase.testToVerifyTextPresent()[pri:0, instance:com.photon.phresco.testcases.WelcomePageTestCase@fc9944] 16554308
=====
Creating C:\Documents and Settings\jagatheswaran_s\Desktop\functional\test-output\WelcomePageTestSuite\VerifyWelcomePageOnFirefox.html
Creating C:\Documents and Settings\jagatheswaran_s\Desktop\functional\test-output\WelcomePageTestSuite\VerifyWelcomePageOnFirefox.xml
FAILED CONFIGURATION: @AfterTest tearDown
java.lang.NullPointerException
    at com.photon.phresco.testcases.WelcomePageTestCase.tearDown(WelcomePageTestCase.java:109)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
    at org.testng.TestRunner.afterRun(TestRunner.java:1021)
    at org.testng.TestRunner.run(TestRunner.java:621)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.access$0(SuiteRunner.java:333)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Krishnan Mahadevan

unread,
18 Feb 2013, 4:07:07 am18/2/13
to seleniu...@googlegroups.com
Doesn't this tell you what needs to be done ?

INFO: ---------------***LAUNCHING INTERNET EXPLORE***-----------
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see http://code.google.com/p/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded fromhttp://code.google.com/p/selenium/downloads/list

Have you gone through that wiki link for IE ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:12:24 am18/2/13
to seleniu...@googlegroups.com
yes ,I download iedriver and set path

Krishnan Mahadevan

unread,
18 Feb 2013, 4:13:54 am18/2/13
to seleniu...@googlegroups.com
Can you please elaborate more here as to what do you mean by you set the path ? Did you use System.setProperty() or did you update your PATH variable ?

What do you see when you open up a command prompt and type : echo %PATH% ?

Where is your IEDriverServer.exe downloaded in your local file system ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:18:04 am18/2/13
to seleniu...@googlegroups.com
I set path in environment variable and in cmd i type echo %PATH%
 I GOT THIS
C:\Documents and Settings\jagatheswaran_s\Desktop\IE-2.0\IEDriverServer.exe

Krishnan Mahadevan

unread,
18 Feb 2013, 4:21:39 am18/2/13
to seleniu...@googlegroups.com
We seem to be going around in circles here. 

So lets do this one step at a time.

1. How did you start your Grid ?
2. How did you start your node ?
3. Is your Grid and Node running on the same machine or are they running on different machines ?
4. Is the machine from where your test is running the same as the machine in (3) or are all these different ?

If your node is running on a DIFFERENT machine than the machine from wherein your code is running, then you need to add the IEDriverServer binary's path in your Node machine's PATH.

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/


Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:25:44 am18/2/13
to seleniu...@googlegroups.com
all in same machine only
i started by hub this command:java -jar selenium-server-standalone.jar -role hub -hubConfig hubconfig.json

node:java -jar selenium-server-standalone.jar -role node -nodeConfig nodeconfig.json


hubconfig.json
{
  "host": "localhost",
  "port": 4444,
  "newSessionWaitTimeout": -1,
  "servlets" : [],
  "prioritizer": null,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 5000,
  "cleanUpCycle": 5000,
  "timeout": 300000,
  "browserTimeout": 0,
  "maxSession": 5
}
nodeconfig.json

{
  "capabilities":
      [
        {
          "browserName": "firefox",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "chrome",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "internet explorer",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "safari",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        },
        {
          "browserName": "opera",
          "maxInstances": 5,
          "seleniumProtocol": "WebDriver"
        }
      ],
  "configuration":
  {
    "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
    "maxSession": 5,
    "port": 5555,
    "host": "localhost",
    "register": true,
    "registerCycle": 5000,
    "hubHost": 172.16.28.3,
    "hubPort": 4444

Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:34:22 am18/2/13
to seleniu...@googlegroups.com
I am using this code to launch IE .check this
private WebDriver driver;
URL server = new URL("http://localhost:4444/wd/hub/");
         selectedBrowser.equalsIgnoreCase("iexplore")) {

            log.info("---------------***LAUNCHING INTERNET EXPLORE***-----------");
            driver = new InternetExplorerDriver();
            capabilities = new DesiredCapabilities();
            capabilities.setJavascriptEnabled(true);
            capabilities.setBrowserName("iexplore");
       
        if (selectedPlatform.equalsIgnoreCase("WINDOWS")) {
            capabilities.setCapability(CapabilityType.PLATFORM,
                    Platform.WINDOWS);
           
        }
        driver = new RemoteWebDriver(server, capabilities);
        driver.get(applicationURL + applicationContext);

Jagatheswaran Selvakumar

unread,
18 Feb 2013, 4:55:28 am18/2/13
to seleniu...@googlegroups.com
reply krish

Krishnan Mahadevan

unread,
18 Feb 2013, 5:09:25 am18/2/13
to seleniu...@googlegroups.com
Jagatheeswarn,
Trying to be pushy on a forum or demanding an answer is NOT going to help you in any way. I am merely here trying to help. But it looks like you are not happy with whatever I have given to you as suggestions.

So I would merely step aside and let someone else help you from here !

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Jagatheswaran Selvakumar

unread,
18 Feb 2013, 5:12:46 am18/2/13
to seleniu...@googlegroups.com
sir please help me sir

Jagatheswaran Selvakumar

unread,
18 Feb 2013, 6:29:58 am18/2/13
to seleniu...@googlegroups.com
Hi
Thank you very much for your help and guidence and finally got it  running successfully in IE.

Sorry to pressure u...Once again Thank you
Reply all
Reply to author
Forward
0 new messages