Wednesday 6 May 2015

Introduction to selenium web driver API



What is Selenium use for automation testing?
Selenium is only web Automation tool which can be used to perform smoke testing, regression testing. In Market there are lot of tool available to perform automation testing like qtp/uft,winrunner , fitness for UAT testing ,  we know that QTP is Licensed Tool and it is very costly, but selenium is Open source tool and easy to use if there is proper guidance,
Most company want to go with selenium for web automation.
It consist of below components:
IDE: IDE has a strong playback mechanism. It is a Firefox plug in. Automation tester can create scripts and run it and get the result through Firefox selenium plug in. It has also to capabilities to export script in selenium RC or Web driver.
RC: RC is a good tool, automation tester can automate web application using any of the programming language that supports, it is required selenium server.
Web driver API:
It consists such a way to direct calls to the browser using each browser's native support for an automation.
Web driver was developed to support latest technique for dynamic web pages like Ajax (now a days many website use the Ajax) where elements of a page may change without the page itself being reloaded.
Selenium Grid for cross platform testing:
Selenium Grid is a server that allows tests to use web browser instances running on remote machines like cloud testing.
There are others tool which can be used to automate both web applications and windows applications like QTP/UFT  . As technical guy aware that QTP/UFT is Licensed Tool and selenium web driver API is Open source tool, download it configure it and enjoy.
This is the main reason why most of the companies choose selenium web driver API tool whenever they want to automate Web applications
As a beginner, if you want to learn selenium web driver API, it is not a racket science, you just start using Selenium IDE for recording which is a Firefox plug-in, used to record and play the script and get the user understandable reports via new ide plug in develop by selenium authorities. This is just for practice and you get information how the commands that are used to run the script in IDE.
but it is advisable IDE itself is not enough for professional test case writing / scripting because it doesn't support looping concepts and you cannot customize it for your needs.
At this point of time, you can start using Web driver API with the programming language (like java)  that you are used to.
Most of the company prefer Java as it is from long time in the industry and there are many online forums which provides support to Web driver API with Java.
How and where to download selenium web driver and use it?
It is quite easy to download selenium we driver API. We need to download a jar file from Selenium Downloads. In the downloads page, you will find the name as Selenium server, where you will have a link to download the latest version of selenium.
And at Selenium Client & Web driver API Language Bindings, You need to select the language that you are going to use to write the selenium scripts. The current version of selenium is change to time to time.
But be quite sure you specify the latest version as there will be some enhancements and fixes shall be added or appended. You can get the information from change log document for reference.
Prerequisites to learn selenium web driver for more effective way?
Before jumping into selenium web driver API, Automation tester should be aware of basic java concepts and HTML concepts which will help the selenium developer to create effective scripts in your assign project.
HTML knowledge: Automation tester should have knowledge in basics of HTML tags like text-box, text-area box, radio buttons check-boxes and the tags for these elements etc.

Java knowledge for Selenium WebDriver: Automation tester need to have minimum knowledge in the below concepts:
  • Static and Non Static Variables
  • Control statements
  • Operators
  • Objects and Classes
  • Return Types
  • OOPS concepts (Inheritance, Overriding, Polymorphism)
  • Strings
  • Integer
  • Testng/Junit frame work
  • Constructors
  • Arrays
  • Exception Handling
  • Packages
  • Maven
  • ANT
If the Automation tester is really strong in the above concepts, they can perfect ally use with selenium web driver API with minimum effort.
An Automation tester without these concepts also can start scripting, but need to work hard to write effective test scripts using selenium web driver API.

No comments:

Post a Comment