What is Web Driver?
Web Driver is a web automation framework. That allows
executing your tests different browsers. But not Firefox, unlike Selenium IDE.
Web Driver also enables to use a programming language in
creating test scripts. But not possible in Selenium IDE.
Now use conditional
operations like if-then-else or switch-case manner
Perform looping like
do-while.
Following programming languages supported by Web Driver
Java
.Net
PHP
Python
Perl
Ruby
Web Driver Vs Selenium RC
The advent of Web
Driver in 2006. There was another automation tool called Selenium RemoteControl. Web Driver and Selenium RC have following features
They both allow
using a programming language in designing test scripts.
They both allow
running tests against different browsers.
Architecture
Web Driver’s architecture is simpler than Selenium RC's.
It controls the
browser from the OS level
All are programming
language's IDE. This contains Selenium commands and a browser.
To launch a separate
application called Selenium Remote Control Server start testing
The Selenium RC
Server acts as a "middleman".
When begin testing.Selenium RC Server "injects". A JavaScript program called Selenium
Core into the browser.
Selenium Core will
start receiving instructions by the RC Server.
The instructions
received. Selenium Core executes them as JavaScript commands.
The browser will
obey the instructions of Selenium Core and its response to the RC Server.
The RC Server will
receive the response of the browser and display the results.
RC Server next
instruction test script to repeat the cycle.
Speed
Web Driver is faster
than Selenium RC. Since it speaks to the browser uses the browsers own engine
to control it.
Selenium RC is slower
since it uses a JavaScript program called Selenium Core. This Selenium Core is
the one that controls the browser, not you.
Real-life Interaction
Web Driver interacts
with page elements in a more realistic way. For example, if you have a disabled
text box on a page testing. Web Driver cannot enter any value in it as how a
real person cannot.
Selenium Core, like other JavaScript codes, can access
disabled elements. In the past, Selenium testers complain. That Selenium Core
was able to enter values in a disabled text box in their tests. Differences in
API
API
Selenium RC's API is more matured but contains redundancies
and often confusing commands. For example, most of the time, testers confused
whether to use type or type Keys. Whether to use click, mouse down, or
mouseDownAt. Worse, different browsers interpret each of these commands in
different ways.
Web Driver’s API is simpler than Selenium RC's. It does not
contain redundant and confusing commands.
Browser Support
Web Driver can support the headless HtmlUnit browser
HtmlUnit termed as "headless" because it is an
invisible browser - it is GUI-less.
It is a very fast browser because no time spent in waiting
for page elements to load. This accelerates your test execution cycles.
Comments
Post a Comment