Introduction to Selenium WebDriver

Introduction to Selenium WebDriver

Introduction to Selenium WebDriver,  Components or Tool’s Suite, Features of Selenium WebDriver, Drawbacks of Selenium IDE, Advantages of selenium Grid, and Functional Automated Testing using Selenium Tool

1) What is Selenium?
2) History of the Selenium Project
3) Selenium Components / Selenium’s Tool Suite
4) Platforms supported by Selenium
5) Selenium License
6) Advantages & disadvantages of Selenium
7) Software Integration for Selenium


1) What is Selenium? (selenium.dev)

Introduction to Selenium WebDriver,

According Selenium official web site (selenium.dev) Selenium automates browsers,
> Selenium primary purpose is Testing of Web Applications,
> Selenium is also supports Automating Web based administration tasks,

i) Selenium is used for Functional & Regression Testing of Web Applications

Functional Testing: Selenium, Micro Focus UFT/QTP, IBM RFT, SilkTest, etc…
Performance Testing: LoadRunner, JMeter,
Web Services Testing: SoapUI
Mobile Testing: Appium

ii) Selenium is an Open source software to automated web browsers

Selenium is open source software, we can download & use Selenium software with free of cost

Selenium automates browsers, means it can automated Web software applications only, and it doesn’t support Desktop software applications.

iii) Selenium supports various Operating systems to conduct testing

MS Windows
Linux
Macintosh

iv) Selenium supports various programming languages to write & execute test cases

Selenium previously supported programming languages.

Java
Python
C#
Ruby
Perl
PHP

Selenium currently supported programming languages.

Java
Python
C#
Ruby
JavaScript
Kotlin

v) Selenium supports various browsers to conduct testing

Google Chrome
Mozilla Firefox
Microsoft IE/Edge
Opera
Safari

Selenium WebDriver supports all popular Web browsers, Test Cases are common for every browser, Browser driver is varies from One browser to another,

vi) Re-usability and Integrations

> Selenium automation test suits are reusable and can be tested across multiple browsers, and operating systems.

> Selenium is not an all-inclusive test tool, it needs third part frameworks and addons to broaden the scope of testing.

(Selenium is not an all inclusive test tool like UFT, RFT etc, we need to integrate other software with Selenium for Selenium Testing,

Example:

Eclipse IDE as editor to write & execute Selenium Test Cases,

Java for Programming,

TestNG Testing Framework as Test Runner,

Maven, Jenkins, Extend Report etc, plugins also integrated with Selenium.

Selenium supports Data Driven Testing, Batch Testing, Cross Browser Testing, and Database Testing.


Note:
1) Selenium IDE doesn’t support programming
2) Selenium IDE supports Chrome and Firefox browsers only
3) Selenium Grid supports only Test execution
4) Selenium RC was out dated and removed from Selenium latest versions


2) History of the Selenium Project

Introduction to Selenium WebDriver,

i) Selenium was first launched in 2004

ii) In 2006, Selenium WebDriver was launched ate Google

iii) In 2008, the whole selenium team decide to merge Selenium WeDriver with Selenium RC, in order from a power tool called Selenium 2.0

Selenium 1.0
(Selenium IDE, Selenium RC, Selenium Grid)

Selenium 1.0 + Selenium WebDriver = Selenium 2.0

Selenium 2.0
(Selenium IDE, Selenium RC, Selenium WebDriver, Selenium Grid)

Note: If we have Selenium WebDriver then no need to have Selenium RC, but they carried Selenium RC in Selenium 2,0 version for maintenance projects.

Selenium 3.0
(Selenium IDE, Selenium WebDriver, Selenium Grid)

Note: Selenium RC (Remote Control) was removed from Selenium 3.0 Version.

Selenium 4.0 coming
(Selenium IDE, Selenium WebDriver, Selenium Grid)

Note: Selenium 4.0 is not stable version, only Alpha version/s released, so you use Selenium 3.0 Version only, and after getting Selenium version then we can start using it.


3) Selenium Components / Selenium’s Tool Suite

i) Selenium IDE
ii) Selenium RC
iii) Selenium WebDriver
iv) Selenium Grid

i) Selenium IDE:

> It is a browser plug-in (Firefox and Chrome) and prototype tool

> It is used to write and execute test cases

> User/tester can record the test cases or type test cases

> User/tester can edit test cases (Add/Update/Delete)

> User can create test suites

> User can debug test cases, and add comments

Note: Selenium IDE Test cases can be created using Element locators and Selenese Commands

Drawbacks of Selenium IDE:

> It doesn’t support programming to enhance test cases, so it is not suitable for complex test design

> No Data Driven testing

> No centralized maintenance of objects/elements

> It doesn’t generate detailed test results

ii) Selenium RC – Out dated

iii) Selenium WebDriver

Selenium WebDriver Test cases can be created using Element locators and WebDriver API commands, and we can enhance test cases using programming and third party frameworks

a) Features of Selenium WebDriver

> Selenium supports various Operating systems, programming languages, browsers etc…

> Selenium WebDriver supports Batch Testing, Data Driven Testing, Cross Browser Testing, and Database Testing.

b) Drawbacks of Selenium WebDriver

> Selenium WebDriver has no IDE (It has Programming interface only)
(It takes more time & efforts to create test cases)

> No built-in Object Repository facility
(* using POM we can create Object Repositories)

> No built-in Result report facility
(*Using Testing framework we can generate test results)

> No other tool integration for test management

> Difficult to configure test environment when it compares to commercial tools like UFT, RFT etc…

iv) Selenium Grid

> Selenium Grid is only for Test execution, and doesn’t support Test case development

> Selenium Grid supports parallel testing

(It can execute selenium WebDriver test cases against different browsers, operating systems using multiple machines (computers)


4) Platforms supported by Selenium

Selenium works with various Operating systems, browsers, programming languages and Testing Frameworks

i) Operating Systems

MS Windows
Linux
Macintosh etc…

ii) Application Environment

1) CUI (* doesn’t support)
2) GUI –
a) Desktop (* doesn’t support)
b) Web (Supports)

Note: CUI – Command User Interface, GUI – Graphical User Interface…. 

iii) Browsers

Google Chrome
Mozilla Firefox
MS Internet Explorer / MS Edge
Opera
Safari

Note: Safari is default browser for Selenium 3.0 version, Test cases are common for every browser, browser driver only various from one browser to another.  

iv) Programming Languages

Java
Python
C#.Net
Ruby
JavaScript
Kotlin

v) Testing Frameworks

Java – JUnit or TestNG
C#.Net – NUnit
Python: unittest, pyunit, py.test
Ruby: RSpecc, Test::Unit

Note: Testing Framework Selection depends on Programming language.


5) Selenium License

> Selenium is an Open Source Software, anybody can download and with free of cost

> Selenium Projects were released under Apache 2.0 license

Objectives of Apache 2.0 license

i) Anybody can download and use Selenium with free of cost

ii) Anybody can modify the source code and use, and distribute to others

iii) Selling modified code is not allowed


6) Advantages and Disadvantages of Selenium

selenium tutorial

Selenium Tutorial for Beginners

Advantages of Selenium

i) It is an Open Source Software

ii) It supports various Operating systems

iii) It supports various Programming languages

iv) It supports various browser environments

v) It supports parallel testing

vi) It uses less hardware resources
Etc…

Disadvantages of Selenium

i) It supports only web based applications

ii) No reliable technical support from anybody

iii) No other tool integration for Test Management

iv) No built-in Object Repository

v) No built-in Result Report facility

vi) Difficult to configure Test Environment

vii) Less support for Image based Testing

viii) It takes time and efforts to create Test cases
etc….


7) Software used for Selenium Testing

i) Editor – Eclipse IDE – Editor for writing and executing programs

(Eclipse is an open-source platform of software development and it supports various Operating platforms.

Eclipse was developed for Java applications, plug-ins allow programmers to develop applications with other languages, including C, C++, COBOL, Perl, PHP and Python.)

ii) Programming Platform – Java – To write Test Scripts and enhance Test Scripts

iii) Test Tool – Selenium WebDriver Java language binding – to write Test Steps

iv) Testing Framework – TestNG- prioritizing Test Cases, Grouping Test Cases, Executing Test batches, Parallel Testing and generate Test Reports.

v) Build Automation Tool – Maven – Easily setup Test Environment and easy Maintenance of the Environment

vi) CI Tool – Jenkins – Continuous Integration (integrating Testing process with development process) etc….

vii) Extent Reports – It is a customizable HTML report which can be integrated into Selenium WebDriver using JUnit and TestNG frameworks.


 

G C Reddy

G C Reddy, Working as a Software Testing Trainer in Hyderabad, India.

You may also like...