Using *safari for Running our Tests on Safari Browser

Using *safari for Running our Tests on Safari Browser

After a lot of research I’ve found that only the following combination works for running our tests on Safari Browser:

Mac OS + Safari Browser -> This will work without any problems.
Windows 7 + Safari Browser -> This may run the tests but the final result will fail though the test executed without any fails. Hence not suggested.
What happened when I tried Running Selenium RC Tests on Windows 7 OS + Safari Browser:
1. I disabled the Pop-Up blocker in Safari Browser as  shown below:
2. Copied the Safari Folder path in C:/Program files as shown below:
3. Click on ‘Start’ Button, Right Click on the ‘Computer’ option in the start Menu and select ‘Properties’ option as shown below:
4. Click on ‘Advanced System Settings’ option and ensure that the ‘System Properties’ dialog is displayed.  In the ‘Advanced’ tab of ‘System Properties’ dialog select ‘Environment Variables’ button as shown below:
5. Ensure that ‘Environment Variables’ sub dialog is displayed, select the Path variable and click on ‘Edit’ button as shown below:
6. Ensure ‘Edit User Variable’ sub dialog is displayed and add a semi colon at the end of the existing statements followed by pasting the above copied path in step 2 into the Variable Value field and click on ‘OK’ button as shown below:
7.  Click on ‘OK’ buttons on the remaining ‘Environment Variables’ and ‘System Properties’ dialog.
8.  In Eclipse IDE, I’ve replaced *iexplore with *safari and Ran the Selenium RC Test using JUnit Test option. Unfortunately the Test didn’t Run.
9. So I have then replaced *safari with *safariproxy as shown below:
 10. Start the Selenium Standalone Server
11. Run the Test using JUnit Test option and observe that the Test Ran this Time in Safari.
12. Though the Selenium Test executed successfully, the Test has resulted as Fail though there are no failures as shown below (i.e. com.thoughtworks.selenium.SeleniumException: ‘undefined’ is not an object is displayed as error )
 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.

NOTE : After lots of research activity its found that Running Selenium RC Tests on Safari Browser of MAC OS X machine will work without any errors. I am not going to explain this practically on MAC machine. Please try yourself.

Advertisements
%d bloggers like this: