Introduction to Selenium

Introduction to Selenium
  1. What is Selenium?
  2. History of the Selenium Project
  3. Selenium's Tools Suite
    • Selenium IDE
    • Selenium RC
    • Selenium WebDriver
    • Selenium Grid

1. What is Selenium?
  • Selenium is a suite of software tools to automate Web Browsers.
  • It is an Open source suite of tools mainly used for Functional and Regression Test Automation.
  • Selenium supports various Operating environments.
      • MS Windows
      • Linux
      • Macintosh
      • Solaris and etc ..
  • Selenium supports various Browsers.
      • Mozilla Firefox
      • IE
      • Google Chrome
      • Safari
      • Opera
      • Android Native browsers
      • IPhone Native browsers
  • Selenium IDE supports Mozilla Firefox only.
  • Selenium supports various programming environments to write Test scripts
      • Java
      • Perl
      • Ruby
      • Python
      • C#
      • PHP
2. History of the Selenium Project
  • Selenium first launched to market in 2004.
  • In 2006, Selenium WebDriver was launched at Google.
  • In 2008, the whole Selenium team decided to merge Selenium WebDriver with Selenium RC in order to form more powerful tool called Selenium 2.0
  Selenium 1: Selenium IDE + Selenium RC + Selenium Grid
  Selenium 2.0: Selenium IDE + Selenium RC + Selenium WebDriver + Selenium Grid

3. Selenium's Tools Suite

1. Selenium IDE : It is a Firefox browser plug in, used to create and execute Test cases.

Selenium IDE Features:
  1. Create Test Cases, Test suites (We can Record test cases or type Test steps using element locators and Selenese commands
  2. Edit Test Cases
  3. Execute Test cases, Test suites
  4. Debug Test Cases.
  5. Enhance Test Cases
  6. Export Test cases to other formats (java, ruby etc...)
  7. Note: selenium IDE Test case default format is .html
Drawbacks of Selenium IDE
  1. It supports Mozilla Firefox browser only.
  2. It doesn't support Programming logic/features to enhance Test cases.
  3. It doesn't support Data Driven Testing.
  4. It is not suitable for complex test case design.
  5. No centralized maintenance of Objects/Elements
2. Selenium RC ( Deprecated): It allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser

3. Selenium WebDriver: It is a Programming interface to create and execute Test cases.
  1. Selenium IDE has IDE but doesn't have Programming interface
  2. Selenium WebDriver has Programming interface but doesn't have IDE
  3. UFT/QTP has both IDE as well as Programming interface
  4. Selenium WebDriver supports various programming environments to write programs.
      1. Java,
      2. C#
      3. Perl
      4. Python
      5. Ruby
      6. PHP

  5. Using Element/Object locators/properties and Webdriver Methods we can create and execute Test cases.
  6. Selenium Webdriver supports various browsers to create and execute test scripts
  7. Note: Browser driver varies from one browser to another.
  8. Selenium WebDriver supports various operating environments
      • MS Windows
      • Linux
      • Macintosh
      • Android Native browsers
      • IPhone Native browsers
Drawback of Selenium WebDriver:
  1. It doesn't generate detailed Test Reports.
  2. No centralized maintenance of Object/elements
4. Selenium Grid
  1. Selenium Grid is used to execute tests across multiple browsers, operating environments and machines in parallel.
  2. Selenium Grid 2 supports Selenium RC Tests as well as Selenium WebDriver Tests.
Selenium Versus UFT

Selenium
UFT / QTP
Open Source
Vendor tool, License is required.
Supports various OS Environments.
MS Windows only.
Supports various Programming Environments
VBScript only.
No Object Repositories
Local and Shared object Repositories.
No built-in Reporting feature.
Built-in reporting feature.
Selenium WebDriver has no IDE and Selenium IDE has no Programming Interface.
UFT has both IDE and Programming Interface.
Uses less Hardware resources.
Uses more Hardware resources
Difficult to setup environment and use.
Easy to setup and use.
Limited support for Image Testing
Rich support for Image Testing
No Reliable support
Support from HP
No other tool integration for Test management.
UFT can be integrated with ALM/QC for Test Management.
New features may not work properly.
New features will properly.
No Add ins for supporting Application Environments.
Add ins are required for supporting Application environments.
Supports Web Applications only
Supports Desktop and Web Applications.

Quick Note:
  1. Selenium WebDriver to create Test cases using element locators and Webdriver methods.
  2. Java Programming to enhance test cases.
  3. TestNG Framework to group test cases, execute test batches and generate detailed test reports.