Wednesday 11 April 2018

Introduction to Selenium WebDriver

Selenium WebDriver one of the most key component of SELENIUM Releases and on which current Automation industry totally rely on, specifically if we say “Open Source Community”.

What is WebDriver in the simple and easy language if we say then “It is an API that’s easy to explore and understand, which help us to make our tests easier to read and maintain.” WebDriver is not linked to any kind of Test Framework or Tool and this makes this API more useful as we can use the same as per our needs or knowledge of other integration open sources like JUNIT, TestNG etc.
  • A well designed Object Oriented API that provides improved support for web-app testing problems.
  • Supports dynamic web pages where the element of a Page may change without the Page itself being reloaded.
  • All the limitations of SELENIUM RC rectified in this Selenium WebDriver  


Selenium RC Limitations

  1. Work using Javascript injection leads to same origin policy issues. WebDriver overcomes this limitation by having driver for each browser.
  2. RC means Remote Control while executing tests using Selenium RC it is obvious to have Selenium RC Server between Application under test & Test Automation Suite. This methodology of Client-Server architecture of Selenium RC makes it slower then Selenium Web Driver.
  3. Redundancy of commands
  4. RC cannot support headless browser but WebDriver can.


WebDriver Architecture

  • WebDriver implemented on Layered Design, the idea behind this implementation is more and more usage of WebDriver for automation and this could be possible by fitting best fit languages.
  • Implementation of WebDriver is that each browser has a language that is most natural to use when attempting to drive it. Drivers are built as per the best-fit language and we can just see the wrapper around them.
  • We can say that for any of browser driver if any of the features work there in one binding language then it should be easy to add support to other binding languages also.
  • Web Driver is a compact Object Oriented API which can directly interact with the Application under tests.
  • WebDriver utilizes the browser native compatibility to automation without using any peripheral entity.




No comments:

Post a Comment