Introduction to Selenium WebDriver



This article gives the details about the WebDriver. 
WebDriver is a Web Automation tool which is used to run the Tests across different browsers[Ex: IE, Firefox,Chrome, Opera etc.]. WebDriver is the new feature in Selenium 2.0.WebDriver also allows/enables us to user different programming languages like Java, .Net, Ruby,PHP, Python and Perl in creating our test scripts.
It’s not mandatory to work all the above mentioned programming languages to work on WebDriver. We just need to be knowledgeable on anyone of the programming language.

WebDriver’s Architecuture:
WebDriver has a very very simple architecture. The following picture depicts the WebDriver’s architecture.


WebDriver controls the Browsers from OS level. The main required thing is that the programming language’s IDE should contain the Selenium commands and a browser.

WebDriver Features:
  • WebDriver is faster as it directly speaks to the browser as well as the uses the browser’s engine to control the same.
  • WebDriver interacts with the application’s elements in a realistic way. WebDriver can’t really enter a value in a Textbox/ Text area if it’s disabled on the web page that we’re testing.
  • WebDriver’s API is very simple as well as easy for understanding. Because, it doesn’t contain redundant and confusing commands.
  • WebDriver can drive an invisible browser called HtmlUnit.
HtmlUnit: HtmlUnit browser is called as “Headless” / Invisible browser as it doesn’t have the GUI. Generally it’s very fast as it doesn’t waste the time in loading page elements. It’ll be helpful in executing the Test for n-number of cycles in a quick period of time. HtmlUnit can be controlled via Automation only as it’s invisible.

Limitations:
WebDriver has certain limitations.
  • WebDriver has no built-in command that automatically generates the Test Result Report/File. We need to rely on the IDE’s output window or write our own code to generate the report as per our requirement. For example, we can customize our output in the form of HTML, Excel or Notepad etc.
  • WebDriver can’t readily support the new browsers. As we know that the WebDriver operates on the OS level. We know that the each browser communicate with the OS in different ways.  The new browser may communicate with the OS in a different process than the old process followed by the older version of the same browser. So, the WebDriver team need take a decision and work towards it to support the new version.
SHARE

About அமரகோசம்

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment