Introduction to Selenium WebDriver

29 February, 2012
Selenium is an open source automation testing suite for web applications across different browsers and platforms. It is similar to QTP but Selenium focuses only on automating web-based applications.

Selenium is not a single tool but a suite of softwares. It has four components.

  • Selenium Integrated Development Environment (IDE)
  • Selenium Remote Control (RC) or Selenium 1
  • WebDriver
  • Selenium Grid

Selenium RC and WebDriver are merged into a single framework to form Selenium WebDriver a.k.a Selenium 2. (Selenium 1 + WebDriver = Selenium 2)

WebDriver is a web automation framework that allows executing tests against different browsers. WebDriver also enables you to use a programming language in creating your test scripts. Selenium 2 supports most of the browsers to run the test cases and supports many programming languages like C#, Java, Python, Ruby, .Net, Perl, PHP, etc.. to create and modify the test scripts.

WebDriver controls the browser directly from the operating system level so its interaction with the browser is very fast. Java is popularly used to write Selenium WebDriver test scripts. In this tutorial, we will be writing tests in Java with Eclipse as our IDE. Selenium WebDriver is used for web as well mobile applications testing.

WebDriver also supports the headless HtmlUnit browser. HtmlUnit is termed as "headless" because it is an invisible browser. It has no GUI. It is a very fast browser because there is no time spent in waiting for page elements to load.
Since it is invisible to the user, it can only be controlled through automation scripts.

Limitations of WebDriver


1. WebDriver cannot immediately support New Browsers
Different browsers communicate with the OS in different ways. If a new browser is launched, it may have a different process of communicating with the OS as compared to other browsers. WebDriver also operates on the OS level. So, we have to wait for the WebDriver team to figure out the new process before they can implement it on the next WebDriver release.

2. WebDriver has no built-in command that automatically generates Test Results Report. We would have to bank on the IDE's output window, or design the report ourselves by writing customized programs to generate graphical and user friendly reports.

Click here to read more about WebDriver.

No comments:

Post a Comment