Running selenium webdrivers in java Eclipse

160 views
Skip to first unread message

nishanth ravi

unread,
Mar 30, 2012, 9:26:22 AM3/30/12
to seleniu...@googlegroups.com
Hi,
   Can anyone tell me the procedure to run the selenium web drivers in Java Eclipse...i have selenium IDE test cases...but i dont know how to convert that files in to java and run in Eclipse....


Pls mention the steps to run the web drivers in Eclipse and also the installation of files needed to run it.....

supriya singla

unread,
Mar 30, 2012, 12:16:45 PM3/30/12
to seleniu...@googlegroups.com
Have u done the complete setup?
Means setup or import the selenium project?
After this u need to record the scenario using ide and then convert that coding into junit4webdriver code by using option tab and then "convert" tab. if it not allowing u to do so then undet option tab there is one more "option" click that and do check the eneble experimental feature chechbox. 


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/lCm_iw8rziEJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

nishanth ravi

unread,
Apr 2, 2012, 1:42:37 AM4/2/12
to seleniu...@googlegroups.com
hello supriya,
i have converted the ide testcases in junit(webdriver) but while running that java file in Eclipse i have come across certain error....so can u tell the steps to run the java files in Eclipse and also about the Maven(Pom.xml) file and dependencies about it...Also about the packages that are needed to extract for running that java files...



Note:
1.Steps for editing the Maven(pom.xml) files
2.packages required for running the program in Eclipse
3.Any documents or ppt for learning it....otherwise website or video tutorial....

Sample:
package com.companyname.selenium.projecttitle;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class TestApp {

    /**
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
        WebDriver d1 = new FirefoxDriver();
        d1.get("http://yahoo.com");

        WebDriver d2=new FirefoxDriver();
        d2.get("http://google.com");
       
        System.out.println(d1.getTitle());
        System.out.println(d2.getTitle());
       
        Thread.sleep(5000L);
       
        d1.quit();
        d2.quit();
       
    }

}

Tell how to run this porgram....

supriya singla

unread,
Apr 2, 2012, 2:15:12 AM4/2/12
to seleniu...@googlegroups.com
Ok. i am mailing u one doc for all these queries..

Best regards
supriya

jeevan

unread,
Apr 2, 2012, 2:19:37 AM4/2/12
to seleniu...@googlegroups.com
Hi Ravi,

Please check this blog:

http://masterofwebdriverg1.blogspot.com/

Thanks,
Jeevan.


On Fri, Mar 30, 2012 at 6:56 PM, nishanth ravi <nishan...@gmail.com> wrote:

--

nishanth ravi

unread,
Apr 2, 2012, 4:02:01 AM4/2/12
to seleniu...@googlegroups.com
k supriya...thanks for your response....

nishanth ravi

unread,
Apr 2, 2012, 4:47:56 AM4/2/12
to seleniu...@googlegroups.com
hi supriya,
i done all the steps in the document......but while running the program i get some error pa...how to fix it...


Error:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost on port 7055 after 45000 ms
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:149)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:79)
    at com.skavasystems.selenium.redbox.TestApp.main(TestApp.java:13)
Exception in thread "main" org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files\Mozilla Firefox\firefox.exe) on port 7055; process output follows:
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: C:\DOCUME~1\admin\LOCALS~1\Temp\anonymous4295979230146286930webdriver-profile\extensions\webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found

Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 16:51:41'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_31'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:149)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:79)
    at com.skavasystems.selenium.redbox.TestApp.main(TestApp.java:13)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost on port 7055 after 45000 ms
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
    ... 5 more

Krishnan Mahadevan

unread,
Apr 2, 2012, 4:49:36 AM4/2/12
to seleniu...@googlegroups.com
Please make use of the latest version of Selenium which is 2.20.0.

You seem to be using selenium 2.6.0 which is very old.

Thanks & Regards
Krishnan Mahadevan

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

nishanth ravi

unread,
Apr 2, 2012, 4:53:22 AM4/2/12
to seleniu...@googlegroups.com
How to change the latest Selenium 2.20.0....

Krishnan Mahadevan

unread,
Apr 2, 2012, 4:54:54 AM4/2/12
to seleniu...@googlegroups.com
If you are working with Maven, refer here :  http://seleniumhq.org/download/maven.html 

Thanks & Regards
Krishnan Mahadevan

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


supriya singla

unread,
Apr 2, 2012, 4:55:37 AM4/2/12
to seleniu...@googlegroups.com
jo dom file hai usme 2.19.0 k place pe 2.20.0 edit kerk baaki k steps foolow ker lo...

supriya singla

unread,
Apr 2, 2012, 4:58:26 AM4/2/12
to seleniu...@googlegroups.com
or mail me ur dom fyl...
my doc contains each and every step. Even i have wrote that use latest version. at that time 2.19.0 was latest but when u open the given link there u will find 2.20.0..

raghu nandan

unread,
Apr 2, 2012, 5:00:29 AM4/2/12
to seleniu...@googlegroups.com
Hi Supriya,

Can you please share the doc with the group as well
with regards
RaghuNandan

Do you know that it takes 10 litres of water to produce 1 sheet of A4 paper?

Don't print this unless you have to :)

 



328.png

supriya singla

unread,
Apr 2, 2012, 5:07:29 AM4/2/12
to seleniu...@googlegroups.com
i dont know how to upload that word doc on this group.
if u would tell me then i dont hav any problem to share it.
328.png

raghu nandan

unread,
Apr 2, 2012, 5:12:17 AM4/2/12
to seleniu...@googlegroups.com
If you click on the Relply option in your gmail you can upload as normal mail u do:-)
328.png

nishanth ravi

unread,
Apr 2, 2012, 5:13:43 AM4/2/12
to seleniu...@googlegroups.com
hi guys,
Thank u very much to all of u guys for helping me......now its running correctly guys....
328.png

Gulshan Saini

unread,
Apr 2, 2012, 8:08:08 AM4/2/12
to seleniu...@googlegroups.com
hit the red button above "Post Reply" . It will show you option to attach file.
supriya


To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
How to change the latest Selenium 2.20.0....

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.



--
with regards
RaghuNandan

Do you know that it takes 10 litres of water to produce 1 sheet of A4 paper?

Don't print this unless you have to :)

 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages