Introduction to Selenium WebDriver for beginners and its importance

What is WebDriver

Webdriver is a Web application Automation tools. You can write scripts in selenium which can be executed on different browsers. We can create more powerful scripts with Selenium WebDriver , Selenium Download link

  • In WebDriver we can you different programming languages to write a test scripts which is not possible in Selenium IDE.
  • We can use looping and If else conditions into our test scripts.

Languages supported by selenium WebDriver

  • Java
  • .Net
  • PHP
  • Python
  • Perl
  • Ruby
Java is widely used with  Selenium WebDriver in market , Before starting with hands on with  Selenium WebDriver you should have basic knowledge of any one programming language mention above.

Main difference between Selenium WebDriver and Selenium RC are as follows

Selenium Webdrive Selenium RC
It controls the browser from the OS level
The Selenium RC Server acts as a "middleman" between your Selenium commands and your browser
WebDriver is faster than Selenium RC since it speaks directly to the browser uses the browser's own engine to control it.
Selenium RC is slower since it uses a Javascript program called Selenium Core
WebDriver interacts with page elements in a more realistic way.
Selenium Core, just like other JavaScript codes, can access disabled elements
WebDriver's API is simpler than Selenium RC's
Selenium RC's API is more matured but contains redundancies and often confusing commands.
WebDriver can support the headless HtmlUnit browser
Selenium RC cannot support the headless HtmlUnit browser.

What we get more in Selenium WebDriver

  • Selenium 1.0 + WebDriver = Selenium 2.0.
  • WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API.
  • WebDriver is a compact Object Oriented API when compared to Selenium1.0
  • It drives the browser much more effectively and overcomes the limitations of Selenium 1.x which affected our functional test coverage, like the file upload or download, pop-ups and dialogs barrier

Setting Up a Selenium-WebDriver Project

The easiest way to set up a Selenium 2.0 Java project is to use Maven. Maven will download the java bindings (the Selenium 2.0 java client library) and all its dependencies, and will create the project for you, using a maven pom.xml (project configuration) file.

Author: Saad Mansuri

Leave a Reply

Your email address will not be published. Required fields are marked *