43. Using *firefox for running Selenium RC Automation Tests on Firefox Browser



Pre-requisites:  Go through Post#7 Ensure Compatible Firefox Browser is Installed

*firefox is used to run the Selenium RC Automation Tests on Firefox Browser.

Lets Implement This:

Pre-requisites:

1. Create a new Project say 'RC-Project15' in Eclipse IDE
2. Configure the Project to work with Selenium RC
3. Configure the Selenium Standalone Server to run from Eclipse IDE
4. Start the Selenium Standalone Server
5. Create a package say 'package_Fifteen' under the newly created project.
6. Create a Java Class file say 'Class15' under the newly created package as shown below: 




Actual Steps:

1. Write the following code into the newly created Java Class file as shown below and make sure that you resolve all the errors before going to next step:



2. Start the Selenium Standalone Server
3. Save and Run the 'Class15.java' file by selecting the 'JUnit Test' option and ensure that Selenium RC Automation Test is Run in Firefox Browser as shown below:




Watch the below video:

Click here to watch the video.

Download this Project:


Click here to download this project and import into Eclipse IDE  on your machine.


Please comment below to feedback or ask questions.

Using *googlechrome for Running our Tests on Chrome Browser will be explained in the next post.



1 comment:

  1. Hi Arun,
    I have a question on the *firefox browser that is added in the open statement.
    1) When I run the script using *Firefox, the scripts runs in FF but it is a lower version which is FF3.6.12. I am using selenium2.41 and in the change log the FF28 is the supported version. Though I have FF28 installed on my machine why is it not picking up.

    I uninstalled FF3.6.12 from my machine (not sure if it is being installed on the test run) and ran the code again. The error message says, specify the path for FF3.6.12 like 'c:/blahblah/firefox.exe'.

    how should i rectify this error and successfully run the script on FF.

    Thanks

    ReplyDelete

Followers

Labels