Developing the selenium java along with eclipse makes the work simpler. configuring of selenium in eclipse is much more simpler than other work. I have given you few things regarding selenium eclipse.Test cases can be written in java and it can be executed using eclipse plug-in. Download Selenium Eclipse (Add the downloaded selenium plug in to your eclipse\plugins folder)
To set selenium in eclipse
Eclipse requires JUnit with Ant. The selenium project can also be developed using JUnit with Maven.
Download
In Previous post I mentioned overview of selenium.In this post i mentioned about why selenium RC is used. And also given you the setting up selenium RC.
Selenium Core needs to make it available from the same web server as the application under test.
The same origin policy states that JavaScript is only allowed to read/modify HTML from the same origin as its source.
If a js file is designed to test google.com, the same origin policy denies to run that js file with google.com; instead, selenium RC can be used to test the site.
Selenium RC makes a proxy server, which allows running the test against the site.
For e.g.: http://www.google.com/selenium-server/MyTestSuite.html.
To Download Selenium RC (Note: FireFox 3 download can be used latest nightly .)
Setting up of selenium RC. Selenium server requires JRE 1.5 (+).
Set system variable
JAVA_HOME= “/*---path location of Java home for e.g.: c:\jdk1.5.0_12---*/”
Set class path of client driver for Java
Class path= “/*-- C:\Selenium\ selenium-remote-control-1.0-SNAPSHOT\selenium-java-client-driver-1.0-SNAPSHOT\selenium-java-client-driver.jar --*/”
Check List
Try in command line. Java –version (it will display the version of the java installed on the computer.)
Then Try using Selenium Server in Interactive mode. java -jar selenium-server.jar –interactive (This will start the selenium server and allows to create a session, opens the browser and test the site in command prompt)
Note:
If you are going to use firefox 3, then make sure that your download support. Before going to test your automation close all the firefox process in your system,which may also restrict to start browser.
I am right now working on selenium automated testing. Here i have given overview of selenium.
Selenium is a testing tool to automate web applications across many platforms.
It is open source software.
This tool is developed in Java Script and hence supports all the major browsers on all the platforms.
Selenium is a cross-browser, cross-platform solution supporting Internet Explorer on Windows and Mozilla-based browsers on Windows, Mac OSX and Linux and Unix.
There are 3 variants in selenium, which can be used to create automation suite for web application.
Selenium Grid is an extension of selenium RC to test in different environment.
Selenium IDE Selenium IDE is an integrated development environment for Selenium tests. It is an easiest way to test the create selenium test. It also serves as a starting point for the automation. Selenium IDE comes as Firefox extension, which allows recording, editing and debugging tests.
Features of Selenium IDE
Record and playback.
Auto complete for all common Selenium commands.
Support for Selenium user-extensions.js file and many more.
Selenium Core
Selenium Core tests run directly in a browser, just as real users do.
Selenium Core used for
Browser compatibility testing- Application can be tested in different browsers and operating system.
System functional testing- Create tests to verify the application functionality and user acceptance.
Selenium Core tests run directly into application webserver. This allows the tests to run in any supported browser on the client-side. Thus, there should be a write access to the machine web application server is running on to install Selenium Core.
Selenium Remote Control
Selenium RC comes in two parts.
A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
Client libraries for your favorite computer language.
The RC server also bundles Selenium Core, and automatically loads it into the browser.
Overall architecture of selenium