Selenium Step by Step Tutorial for Beginners

Selenium Step by Step Tutorial for Beginners

Selenium Step by Step Tutorial for Beginners, Selenium WebDriver Tutorial, Java Programming for Selenium, TestNG Testing Framework for Selenium, Selenium Automation Framework, and Selenium Live Project.

I. Selenium WebDriver:

Three important topics of Selenium WebDriver

1) Install Selenium (Selenium Test Environment Setup)

2) Locating Elements (using element locators)

3) Performing Actions on the Elements (using Selenium WebDriver methods)

1) Introduction 

Selenium Step by Step Tutorial for Beginners, What is Selenium?, History of the Selenium Project, Selenium Components, Selenium License, Platforms supported by Selenium, Advantages of Selenium, Drawback of Selenium, and Software Integration for Selenium.

2) Selenium Installation

Select Selenium tool/s and other Software for Testing, Download Java (JDK) Software,  Install Java, Set Java Environment variable, Download and extract/install Eclipse IDE, and check the Selenium Test Environment.

selenium tutorial

Selenium step by Step Tutorial for Beginners.

3) Locating Elements

Web Elements, Element Locators, id, name, className, tagName, linkText, partialLinkText, cssSelector, and xpath.

4) Performing Actions on the AUT

Selenium WebDriver methods for performing actions on web elements, Browser regular methods, browser navigation methods, WebDriver methods for web elements, and Selenium WebDriver verification methods.

5) Element handling in Selenium

Handling web elements using Element Locators and Selenium WebDriver API Commands / Methods. Handling browsers, handling edit box, handling button, handling link, handling text area, handling error messages, and handling popup windows. Handling image, handling image link, handling image button, handling checkbox, handling radio button, handling web table / html table, and handling frames.

6) Write Selenium Test Cases

Prerequisites to write Selenium Test cases, Select Manual Test cases for automation, Inspect elements, automate Manual Test cases using Element locators and Selenium WebDriver Methods. Enhance Test cases using Programming concepts, and run Test cases by instantiating the Browser driver.

7) Browser Compatibility Testing

Download various browser drivers like Google chrome, Mozilla Firefox (gecko), and Microsoft Edge Driver. Create a Test case using element locators and WebDriver methods, and execute the Test case against various browsers by instantiating those browser drivers.

8) Data Driven Testing, and Batch Testing

What is Data driven testing?, why data driven testing, and how to conduct data driven testing using Selenium with Java. What is Batch Testing?, Create test cases using reusable functions (user defined methods), and create Test batches, and conduct Batch testing.

9) Database Testing

Make a connection to the Database by creating database connection object, load the JDBC Driver, Send Queries to the Database by creating statement object, and Process the test results.

10) Page Object Model in Selenium

Page Object Model with Page Factory, Page Object Model without Page Factory, creates Object Repository for web UI elements, and Create Test cases using Object Repositories (Page classes).


II. Java for Selenium

Java has three important editions, Java Standard edition, Java Enterprise edition, and Java Micro  edition.

Java Standard Edition or Core Java is enough for Selenium, and Advanced Java is not required.

In Java Standard edition or Core Java also we have two types of concepts, one is GUI Programming and another is Functionality development, GUI Programming (Using Java Swing etc,) is not required for Selenium.

We can segregate Java for Selenium into four parts and learn only those four parts for Selenium.

1) Java Program Environment

2) Java Language Fundamentals

3) Java Object Oriented Programming

4) Java Specialized Concepts

1) Java Installation and write first Java Program

Download Java (JDK – Java Development Kit) Software, Install Java, Set Java Environment variable, Download and extract / install Eclipse IDE (Integrated Development Environment), Configure Eclipse IDE, and write & execute first Java Program.

2) Java Language Fundamentals Part-1

Java Program Structure / Java program format, Java basic syntax, Java keywords, and Java identifiers. Java comments, Java variables, types of variables, and variable naming rules.

3) Java Language Fundamentals Part-2

Java Data Types, Java primitive data types, Java non primitive data types, and Java data type conversion. Operations in Java, Java Arithmetic operators,  Java Unary operators, Java Assignment operators, Java Comparison or Relational operators, and Java Logical operators.

4) Java Language Fundamentals Part-3

Java Control flow, Java Conditional or Decision making statements (if, switch), Java Loop statements (for, while, do while, and enhanced for), and Java Branching statements (break, continue, and return).

java tutorial

Core Java Step by Step Tutorial

5) Java Object Oriented Programming Part-1

Class, Object, Modifiers, Methods (Built-in and User defined), Constructor, and Java Interface. Java Methods – Java Built-in Methods (String methods, Number Methods, Array Methods, and Character Methods), Java User Methods – Method with with return a value (Static and Non static Methods), and without returning any value (Static and Non static Methods).

6) Java Object Oriented Programming Part-2

Object oriented programming fundamentals, Java Inheritance, Java Polymorphism, Java Abstraction, and Java Encapsulation.

7) Java Specialized Concepts Part-1

String handling in Java, Java Arrays, Java Collections, Java User Input, Java IO (Input & Output) – File handling.

8) Java Specialized Concepts Part-2

Java Exception handling, common scenarios where exception may occur, ArithmeticException,  NumberFormatException, NupointerException, and ArrayIndexOutOfBoundsException etc…

Java Database Connectivity…


IIi. TestNG Testing Framework

TestNG Tutorial

TestNG Testing Framework for Selenium

1) TestNG Testing Framework for Selenium Part-1

Install TestNG plugin for Eclipse IDE, Create first TestNG Program, TestNG Annotations & Attributes, Create multiple Test cases & Run.

2) TestNG Testing Framework for Selenium Part-2

Priritize Test Cases, group Test cases, run multiple programs using XML, data driven testing using @DataProvider, parallel testing, and Generate Test result.


iv. Selenium Automation Framework

1) Selenium Automation Framework Part-1

Selenium Test environment setup, add TestNG plugin, Maven integrating with Selenium,  Jenkins integration with Selenium, and add Extent Reports plugin.

2) Selenium Automation Framework Part-2

Create Initialization script, Create Web elements & customized commands, create reusable functions, create Test cases using Page object model, run Test results, and export test results.


v. Selenium Live Project

1) Selenium Project Part-1

2) Selenium Project Part-1


Software used for Selenium Testing

Selenium WebDriver – Test Tool

Selenium Grid – Test Tool

Java – Programming Language

Eclipse IDE – Java Application Development Environment

TestNG – Unit Testing Framework

Maven – Build Automation Tool

Jenkins – CI Tool (Continuous Integration)

Extent Reports – Customizable HTML Report Plugin

Etc…


G C Reddy

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

You may also like...