2. WORKING WITH SELENIUM
SELENIUM
Selenium is the open source tool for functional and regression testing
Having 4 Parts
Selenium IDE
It’s a java script framework.
It is installed as add-on on Mozilla
It is used to record user steps on application.
Selenium RC
It is mainly used to run test suites on multiple browser.
Selenium GRID
+use to execute test cases on Multiple Browsers/Multiple systems in
parallel.
WebDriver
+alternate of selenium RC, provide fast execution of test cases.
Commands used in selenium are called Selenese
ADVANTAGE OF SELENIUM
Open Source Tool, so no license fees.
Support large number of programming language for scripting.
Support large number of browsers.
With Selenium Grid, we can execute in parallel, ultimately fast execution.
DISADVANTAGE OF SELENIUM
3. Support only Web based applications.
Its Free, so no support is available.
No Rich GUI / Lot of programming skills are required.
Does not support FLASH, Silverlight etc
PARTS OF SELENIUM
SELENIUM IDE SELENIUM RC SELENIUM GRID
RC Server Selenium Hub
Selenium Core Selenium RC
Client Libraries
SELENIUM RC(Remote Control) Components
RC Server
Selenium Core
Client Libraries
The RC Selenium Server
launches and kills browsers
interprets and runs the Selenese commands passed from the test program
acts as an HTTP proxy, intercepting and verifying HTTP messages passed
between the browser and the AUT.
Return result of selenium command back to test program.
Selenium server is bundled with selenium core, automatically inject this selenium
core to browser when start browser.
Selenium-Core
is a JavaScript program, actually a set of JavaScript functions which interprets and
executes Selenese commands using the browser’s built-in JavaScript interpreter.
Client libraries
4. which provide the interface between each programming language and the Selenium RC
Server.
Client libraries provide support of different language to selenium
Here is a simplified architecture diagram....
The diagram shows the 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
5. the Selenium command. This runs the Selenese action or verification you specified in your test
script.
WORKING WITH SELENIUM GRID
Selenium Grid is the part of selenium test suite, which is used to distribute selenium test cases
on multiple browser and multiple machine with the help of that we can run multiple test cases in
parallel.
Selenium Grid has 2 controls selenium Hub and Selenium RC, selenium hub takes request from
different tests(as RC do in normal condition) and then allocate remote control that are registered
to the hub.(1 RC to 1 test request)
6. Web Driver
New Enhancement to Selenium 2.0.
We need not to start selenium Server
Interact with Browser Directly(Not using Java Core etc)
Support HTML Dom as well, so we can work on multiple elements together.
HtmlUnitDriver:- is much faster because it run test case in memory not in physical.
We have Native Drivers for each Browser sp we need to make implements separately for each
driver.
7. Advantage : Fast
No need to use selenium server.
Disadvantage : Need to implement native driver for each browser
Give support to only few browsers till now.