Showing posts with label Setup. Show all posts
Showing posts with label Setup. Show all posts

Thursday, 8 September 2011

Selenium-RC components

Selenium Server which launches and kills browsers, interprets and runs the Selenese commands passed from the test program, and acts as an HTTP proxy, intercepting and verifying HTTP messages passed between the browser and the AUT.
Client libraries which provide the interface between each programming language and the Selenium-RC Server.
 
  Client libraries communicate with the Server passing each Selenium command for execution. Then the server passes the Selenium command to the browser using Selenium-Core JavaScript commands. The browser, using its JavaScript interpreter, executes the Selenium command. This runs the Selenese action or verification you specified in your test script.

Selenium Components

 
Selenium-IDE:  is a Firefox add-on that makes it easy to record and playback tests in Firefox. You can even use it generate code to run the tests with Selenium Remote Control.
Selenium Core: is the original JavaScript-based testing system. It's now used primarily as a component of Selenium Remote Control, but it can also be used as a pure testing system for different browsers.
Selenium-RC (Remote Control):  is a client/server system that allows you to control web browsers locally or on other computers, using almost any programming language and testing framework.

Tuesday, 6 September 2011

Configuring TestNG With Eclipse

    Follow below steps to configure Selenium-RC With Eclipse :
  1. Open your desired Java IDE (Eclipse)
  2. Select the 'Install New Software' from the 'Help' Menu the following window will display

    3.Click on the 'Add' button in 'Install' window then following window will display
    4.Enter the Name as 'TestNG' and Location as 'http://beust.com/eclipse1' and click 'Ok'
    5.Select the TestNG relevant check box and click on 'Next'.
    6.It automatically download and Install the TestNG
    7.Click on 'Finish' and Restart the Java IDE (Eclipse)

Configuring Selenium-RC With Eclipse

Follow below steps to configure Selenium-RC With Eclipse :
  1. Download Selenium RC java client driver from the Selenium-HQ downloads page.
  2. Extract selenium-java-<version-number>.jar file
  3. Open your desired Java IDE (Eclipse)
  4. Create a java project.
  5. Configure Build Path with downloaded jar files to java project as references.
  6. Run Selenium server from the console to execute your tests from the Java IDE (Eclipse)

Selenium RC Server

  Installing Selenium Server
  The Selenium RC server is simply a Java jar file (selenium-server-standalone-<version-number>.jar), which doesn’t require any special installation. Just downloading the zip file and extracting the server in the desired directory is sufficient
Running Selenium Server 
Go to the directory where Selenium RC’s server is located and run the following from a command-line console.
 java -jar selenium-server-standalone-<version-number>.jar
This can be simplified by creating a batch or shell executable file (.bat on Windows and .sh on Linux) containing the command above. Then make a shortcut to that executable on your desktop and simply double-click the icon to start the server.
Note : For the server to run need Java installed and the PATH environment variable correctly configured to run it from the console. You can check that you have Java correctly installed by running the following on a console:
 java -version
If promt version number (which needs to be 1.5 or later), ready to start using Selenium RC.