Selenium WebDriver Introduction

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.

Selenium is not a single tool, a suite of tools, we have four tools in this tool suite.
1. Selenium IDE (It is a record & playback tool, not suitable for complex testing)
2. Selenium RC (*Out-Dated)
3. Selenium WebDriver (Powerful tool in this tool’s suite, and it supports Programming)
4. Selenium Grid (It is only for Parallel Test execution)


1) What is Selenium WebDriver? 

According to Selenium’s official website (selenium.dev) Selenium automates browsers, Selenium’s primary purpose is Testing of Web Applications, and Selenium is also supported Automating Web-based administration tasks.

2. Selenium WebDriver Features:

1. Selenium WebDriver is used for Functional & Regression Testing of Web Applications
2. Selenium WebDriver is an Open source software for automated web browsers
3. Selenium WebDriver supports various Operating systems to conduct testing (MS Windows, Linux, and Macintosh).
4. Selenium WebDriver supports various programming languages to write & execute test cases (Java, Python, C#, Ruby, JavaScript, and Kotlin).
5. Selenium WebDriver supports various browsers to conduct testing (Google Chrome, Mozilla Firefox, Microsoft IE/Edge, Opera, and Safari).
6. Selenium automation test suits are reusable and can be tested across multiple browsers, and operating systems.
7. Selenium WebDriver supports Batch Testing, Data-Driven Testing, Cross Browser Testing, and Database Testing
8. Selenium WebDriver is faster in Test Execution over other tools in Selenium’s suite
9. Selenium WebDriver supports Parallel Testing with the help of Testing Framework


3. Drawbacks of Selenium WebDriver

1. Selenium WebDriver has no IDE, only Programming Interface
2. It doesn’t have a built-in Result Reporting facility
3. No Test Tool Integration for Test management.
4. No Centralized maintenance of Elements/Objects
5. It supports only Web-based Applications
6. No reliable Technical support from anybody
7. It doesn’t recognize Flash Objects, Windows Objects in web pages
8. New Features may not work properly
9. Environment Setup is difficult when it compares to commercial tools like UFT, RFT, etc…
Etc…

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


4. History of  Selenium WebDriver

Selenium WebDriver was launched at Google In 2006, and in 2008, the whole selenium team decides to merge Selenium WeDriver with Selenium RC, in order to form  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)

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 a stable version, only Alpha version/s released, so you use Selenium 3.0 Version only, and after getting the Selenium version then we can start using it.


5. Software used for Selenium Testing

The selection of frameworks and add-ons depends on the programming platform, if we select Java for selenium then supported software are, 

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.


6. Automated Testing using Selenium WebDriver

Selenium WebDriver performs actios based on HTML Elements/Objects/Software Objects,

Software Objects or HTML Elements in Web Applications:

Edit Box, Text Box, Link, Button, Dropdown Box, List Box, Combo Box, Image, Image Button, Image Link, Radio Button, Checkbox, Web Table, Frame, etc,

We create Selenium Test Cases using Element Locators and WebDriver Methods.

Element Locator – to identify/recognize/locate an element in Web Pages
WebDriver Method – to perform Operation on the Element

Example:

Test Step: Click “Gmail” link in Google Home Page.

‘Gmail’ (Link) Element/Object -Element Locator
‘Click’ – Operation on the Element -WebDriver Command

Selenium WebDriver Test Step:

driverObject.findElement(By.linkText(“Gmail”)).Click

driverObject – Browser driver (user-defined),
findElement – WebDriver Command,
By – Selenium predefined Class,
linkText – Element Locator (HTML),
“Gmail” – Locator value provided by Web Developer
Click – WebDriver Method,

Introduction to Selenium WebDriver


7. Selenium WebDriver Test Process:

• Inspect Web/HTML Elements – Using a Browser built-in tools.
• Locating Elements using Element Locators
• Performing Actions on Elements using Selenium WebDriver Methods.
• Creating Object Repositories Using Selenium Page Object Model
• Writing Test cases using Element Locators and WebDriver Methods.
• Enhancing Test cases using programming (Ex: Java) and Testing Framework (Ex: TestNG) concepts.


Manual Testing Tutorial

Java Tutorial

Python Tutorial

SQL Tutorial

Selenium, Java, and Testing Videos

Follow me on social media:

1 thought on “Selenium WebDriver Introduction”

Leave a Comment