Selenium WebDriver with Java - Basics to Advanced and Frameworks

Video description

Learn how to solve real-world Selenium challenges with the help of more than hundred examples

About This Video

  • Master Selenium WebDriver by understanding Java basics
  • Explore mobile testing, database testing, and performance testing with Selenium
  • Gain the confidence to lead an entire Selenium automation project

In Detail

Do you want to perform automation testing on website applications with Selenium and Java? This video course will help you build your knowledge of Selenium WebDriver by guiding you through the basics of Java. You will gain the confidence to perform automation testing on any web application. The topics range from basic to advanced levels, covering a variety of tricks and tips to help you progress.

The course starts with an introduction to Selenium and Java and delves into Selenium WebDriver and the Java concepts needed for manual testing and Selenium automation. Next, you will gain insights into functional testing with Selenium and execute browser testing, database testing, and performance testing on a Selenium script. You will also learn mobile testing basics and the latest features of Selenium 4.0. As you advance, you will understand the framework design of TestNG, ANT, page object, Maven, Jenkins, Excel data-driven, Cucumber, and log4j. Toward the end, you will become familiar with core Java concepts, perform cloud testing with Selenium, and explore interview questions.

By the end of this course, you will have learned Selenium and be equipped with the skills you need to perform end-to-end automation testing for web applications.

Who this book is for

If you’re new to software development and testing or are an experienced manual tester who is looking to master Selenium to move into automation testing, then this course is for you. No prior experience of programming or Java coding is needed to get started with this course.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Selenium Introduction
    1. Course Frequently Asked Questions (FAQs)
    2. Social Proof for Bestseller in Selenium Cateogory
    3. Selenium Features - What You Need to Know
    4. Selenium WebDriver Architecture Simplified
  2. Chapter 2 : Complete Installation Guide for Java and Selenium Learning
    1. Java Installation
    2. How to Set JAVA_HOME Path in Mac
    3. Eclipse Installation and Configuration
    4. Selenium Project Creation with Class Files
    5. Downloading and Configuring Selenium
  3. Chapter 3 : Brush-Up Java Concepts for Selenium Automation
    1. How to Run Tests in Google Chrome
    2. Setting Chrome Driver Path in Mac (for Mac Users Only)
    3. How to Run Tests in Firefox and Internet Explorer (IE)
    4. Troubleshooting Errors on Browser Invocation Code
    5. Brush-Up Basic Java Concepts -1
    6. Brush-Up Basic Java Concepts -2
    7. Brush-Up Basic Java Concepts - 3
  4. Chapter 4 : Configuring Selenium and Running Tests on All Browsers
    1. WebDriver Browser Methods - 1
    2. WebDriver Browser Methods - 2
  5. Chapter 5 : Locator Techniques and Tools used to Identify Objects
    1. Importance of Locator Identifiers in Selenium
    2. Identifying Locators (id.Name.Linktext) with Developer Tools -1
    3. Identifying Locators (ClassName) with Developer Tools -2
    4. Identifying XPath in Chrome and Firefox Browsers
    5. Identifying Cascading Style Sheets (CSS) Locators with Chrome and Firefox Add-ons
    6. Validating the Accuracy of XPath and Cascading Style Sheets (CSS) from Browser Add-ons
    7. Practice Exercises on Locators Learnt from the Previous Lectures
    8. Generating Customized XPath from HTML Attributes
    9. Generating Customized Cascading Style Sheets (CSS) from HTML Attributes
    10. Practice Exercises with XPath and Cascading Style Sheets (CSS) with Regular Expressions
    11. Web Applications to Practice Selenium Automation
  6. Chapter 6 : Fifteen Popular Interview Questions on Selenium Basics
    1. Identifying XPath with Parent Child Traverse Relationship
    2. Surprise! Using ChroPath Plug-in to get XPath and Cascading Style Sheets (CSS)
    3. Difference Between Relative and Absolute XPath
    4. How to Identify Siblings and Traverse Back to Parent Nodes with XPATH?
    5. Identifying Objects with Text using XPATH Locators
    6. Cascading Style Sheets (CSS) Selectors Locators
    7. Tricks and Tips for Identifying Objects - Interview Preparation
  7. Chapter 7 : Selenium WebDriver: Techniques to Automate Web Elements
    1. Handling Static Drop-downs with Select WebDriver Application Programming Interface (API)
    2. Latest Drop-down Looping User Interface (UI)
    3. Handling Dynamic Drop-downs Menus with WebDriver Application Programming Interface (API)
    4. Parent-Child Relationship Locator to Identify the Objects Uniquely
    5. Handling AutoSuggestive Drop-downs Using Selenium
    6. Handling Check Box and Getting their Size with Selenium
    7. Importance of Assertions in Automation Testing and How to Use Them
    8. Handling Calendar User Interface (UI) in Travel Websites Using Selenium
    9. Validating if User Interface (UI) Elements Are Disabled or Enabled with Attributes
    10. End-to- End Automation Using All User Interface (UI) Elements with Selenium
    11. Handling Java Alerts Using the Selenium WebDriver
  8. Chapter 8 : Deep Dive into Functional Testing with Selenium
    1. Code Formatting and Debugging
    2. Problem - Adding Items into Cart for Ecommerce Application
    3. Sending Array of Products to Cart for Checkout
    4. Building Programming Logic to Process Items in an Array for Cart
    5. Debugging the Code to Understand How the Flow is Built
    6. Fixing the Problem of Inconsistent Locators and Making Tests Clean
  9. Chapter 9 : Synchronization Usage in Selenium WebDriver
    1. What is Implicit Wait? Explain with Real Time Scenario
    2. What is Explicit Wait? Explain with Real Time Scenario
    3. Scenario to Automate and Necessity of Waits in the Example
    4. Practical Examples on Implicit Wait
    5. Practical Examples on Explicit Waits
    6. What is Fluent Wait? What are its Advantages?
    7. Building Customized Methods using Fluent Wait
    8. Practice Example on Fluent Wait
  10. Chapter 10 : Techniques to Automate Ajax Calls, Child Windows, and iFrames
    1. Handling Ajax/Mouse Interactions
    2. Actions Class – Real-Time Example
    3. Handling Multiple Windows
    4. Window Handle Concepts - Real Time Example
    5. Live Example on Working with Child Windows
    6. How to Handle Frames?
    7. Frames Techniques - Real Time Example
    8. Interview Questions
  11. Chapter 11 : Real- Time Exercises (End-to-End Programming)
    1. Practice Exercise - Print the Links Count in the Page
    2. Limiting WebDriver Scope
    3. How to Open the Links in Separate Tabs - Optimized Solution
    4. Getting the Titles of Child Tabs with Optimized While Loop
    5. Handling the Calendar User Interface (UI) in Travel Websites
    6. Generic Method to Handle Calendar with Month and Date
    7. Solved Example on Calendar Methods
  12. Chapter 12 : Practical Problems and Methods to Handle them with Selenium
    1. How to Handle Table Grids in a Webpage
    2. Techniques used for Table Grid - Real-Time Example
    3. Practice Exercises on Tables - 1
    4. Practice Exercises on Tables - 2
    5. Handling AutoSuggestive Drop-down Options
    6. Importance of JavaScript Executor
    7. End-to-End Practice Exercise
  13. Chapter 13 : Miscellaneous Topics in Selenium WebDriver
    1. Handling HTTPS Certifications
    2. Maximizing Window and Deleting Cookies
    3. How to Take Screenshots in Selenium
    4. Strategy to Automate the Broken Links with Selenium
    5. Open Connection Method to Identify Status Codes of the Links
    6. Iterating Over All Links in the Page to Validate Broken Links Mechanism
    7. Importance of Soft Assertions in Selenium WebDriver
  14. Chapter 14 : Selenium Java Streams - Automate Sort, Pagination, and Filtering the Web Tales
    1. Important Note - Plan of Learning this Section
    2. Learning Everything About JavaStreams
    3. Performing Web Table Sorting using Selenium JavaStreams
    4. Building Custom Selenium Methods using Streams Mapper
    5. Automating Pagination Scenarios to Search Data Using the Do While Loop
    6. Filter the Web Table using Selenium JavaStreams
  15. Chapter 15 : Cross Browser Testing with Selenium Grid
    1. Introduction to Grid
    2. Registering Hub with Nodes for Execution
    3. Registering Nodes with Browser Drivers
    4. DesiredCapabilities and RemoteWebDriver Importance
    5. Cross Browser Testing Rules-Grid Program
  16. Chapter 16 : Selenium 4.0 - Latest Features
    1. Important Note
    2. Introduction to Relative Locators
    3. Relative Locators with Real-Time Examples
    4. Invoking Multiple Windows/Tabs from Selenium
    5. Taking WebElement Partial Screenshot with Selenium
    6. Capturing the Height and Width of WebElement for User Experience (UX) Validation
  17. Chapter 17 : Framework Learning Plan
    1. Framework Learning Plan
  18. Chapter 18 : Framework Part 1 - TestNG
    1. Why TestNG and its Advantages
    2. Running Test Cases in TestNG without Java Compiler
    3. Importance of Extensible Markup Language (XML) File in TestNG Configuration
    4. Prioritizing the Test Cases with TestNG
    5. Include and Exclude Mechanism to Control Test Cases
    6. Executing the Test Cases at Package Level with Regex
    7. TestNG Annotations Part - 1
    8. TestNG Annotations Part - 2
    9. Using Groups Functionality in TestNG
    10. Annotations Helper Attributes with Examples
    11. Parameterizing from TestNG XML File
    12. DataProvider Annotation - Parameterizing Test Cases - 1
    13. DataProvider Annotation -Parameterizing Test Cases - 2
    14. Listeners Interface in TestNG Framework
    15. Running Tests in Parallel and Generating Reports
  19. Chapter 19 : Framework Part 2 - Global Environment Variables Setup and Reusable Components
    1. How to Write Global Parameters with Java Code
  20. Chapter 20 : Framework Part 3 - Maven Build Management Tool
    1. Importance of Maven in Framework Development
    2. Installing and Configuring Maven
    3. Creating Maven Project and Understanding its Terminologies
    4. Understanding the POM.xml File and its Dependencies
    5. Importance of Surefire Plug-in in Executing Tests
    6. Integrating TestNG with Maven
    7. Switching the Tests with Maven Profiling
  21. Chapter 21 : Framework Part 4 - Jenkins (Continuous Integration Tool)
    1. Importance of Jenkins in Test Frameworks
    2. Installing and Configuring Jenkins
    3. Configuring Jenkin Settings and Workspace
  22. Chapter 22 : Framework Part 5 - TestNG Reports for Jenkin Jobs
    1. TestNG Reporting Plug-in into Jenkin Jobs
  23. Chapter 23 : Extent Reporting Basics for Test Execution Results in Framework
    1. What Are Extent Reports and its Basic Configuration?
    2. Extent Reports Generation for Standalone TestNG Tests
  24. Chapter 24 : Framework Part 6: Data Driven Testing Utilities
    1. What is Apache POI API and Download Instructions?
    2. Strategy to Access Excel Data
    3. Getting Rows and its Cells from a Sheet
    4. Retrieving Data from Excel Based on Condition
    5. Practice Exercise - Excel Driven Testing - 1
    6. Practice Exercise - Excel Driven Testing - 2
    7. Practice Exercise - Excel Driven Testing - 3
  25. Chapter 25 : Framework Part 7: Logging Framework - log4j
    1. What is log4j and its Usage in Selenium Framework
    2. Importing log4j into Eclipse Project
    3. Importance of log4j Extensible Markup Language (XML) File
    4. Understanding the Extensible Markup Language (XML) File to Control Logging in Test Case
    5. Test Case Logging with log4j Example - 1
    6. Test Case Logging with log4j Example - 2
  26. Chapter 26 : Framework Part 8 - Page Object Pattern and Page Factory
    1. What is Page Object Model?
    2. Creating Page Object Constructor in Classes
    3. Object Repository Mechanism
    4. Practical Exercise Explaining Page Object Model
    5. Page Object Factory and its Advantages
    6. Page Factory Annotations FindBy
    7. Practical Example Explaining Page Factory Model
  27. Chapter 27 : Framework Building from Scratch - Real Time Project
    1. End-to-End Framework Agenda - Must Watch
    2. Creating Maven Test Project and Configuring Framework Dependencies
    3. Designing Base Test with Global Variables Setup
    4. Implementing Page Object Mechanism to Drive Tests
    5. Creating Multiple Tests with Centralized Data
    6. Parameterizing the Tests with Multiple Data using TestNG
    7. Asserting the Test Cases with Validations
    8. Adding Tests to Suite in Framework Guidelines
    9. Converting Framework into TestNG and Configuring TestNG Extended Module (XM) File
    10. Configuring Tests with Setup and Teardown in TestNG Framework
    11. Integrating log4j Logging Application Programming Interface (API) into Framework
    12. Fixing the Framework Issues by Tweaking TestNG Extensible Markup Language (XML) File
    13. Screenshots on Failure - TestNG Listeners
    14. How to Send Driver Object of Test Instance to Listener on Test Failure?
    15. Extent Reports after Generation on Test Execution
    16. How to Make Framework Thread Safe for Parallel Execution?
    17. Optimizing the Page Objects Feature with the Smart Way of Objects Creation
    18. Integrating Project to Jenkins Continuous Integration (CI) Tool
  28. Chapter 28 : Selenium Framework Optimization and Interview Questions
    1. How to Parameterize Jenkin Build with the Multi Options Profile?
    2. Live Example in Parameterizing Job with Multiple Browser Options
    3. Coding Standards to Achieve Encapsulation in Framework
    4. Removing Hard Coded Paths in Framework by Generating Paths Dynamically
    5. How to Execute Tests in Chrome Headless Mode?
    6. Where are Inheritance, Interfaces, and Statics used in Framework?
    7. Best Approach on How to Consolidate Test Cases into Different Classes
    8. Demonstrating Clubbing Tests into Classes in Framework
  29. Chapter 29 : Database Connection to Selenium Test Cases
    1. Steps to Connect a Database to Selenium Test Cases
    2. MySQL Download Instructions
    3. MySQL Server Connection Procedure
    4. Creating a Database in MySQL Server
    5. Creating Tables in Databases
    6. Inserting Records into a Table
    7. Integrating a Database with the Java Database Connectivity (JDBC) API
    8. Steps to Connect Database Information to Selenium - 1
    9. Steps to Connect Database Information to Selenium - 2
  30. Chapter 30 : Java Object Oriented Programming System (OOPS) Basic for Selenium Part - 1
    1. Writing the First Executable Program in Java
    2. Usage of Methods in Java
    3. Importance of Classes and Objects in Java
    4. Two Ways of Defining a String Object – Important from Interview Point of View
    5. String Class and their Methods
    6. Practice Exercise Reverse String Logic-Palindrome
    7. If-Else Condition Usage in Java
    8. How FOR Loops Work - with Example
    9. When Should you use the While Loop?
    10. How Does the While Loop Work?
    11. Explanation on Nested FOR Loops
    12. Practice Exercise on Loops -1 (Printing Pyramid Triangle)
    13. Practice Exercise – 2 - Yahoo Question (Inverted Sequence Pyramid Logic Program)
    14. What is an Interface?
    15. How can Java Classes Take Advantage of Interfaces?
    16. What are Abstract Classes and how Different are they from Interfaces?
    17. Using Inheritance in Java
    18. Practical Examples on Types of Inheritances
    19. Explaining Function Overloading in Java with an Example
    20. How Different is Function Overriding from Overloading? Explain
    21. What are Arrays and their usage in Java Programs?
    22. Ways of Initializing Arrays and Assigning Objects
    23. Logic Program on Multi-Dimensional Arrays
    24. Practice exercise - Print the Smallest Number in a 3*3 Matrix
    25. Practice Exercise - Cisco Interview Question on Arrays
  31. Chapter 31 : Core Java Tutorial - Part 2
    1. Date Class Concepts
    2. Working with Calendar Objects in Java
    3. How the Constructor Plays a Crucial Role?
    4. Types of Constructors and their Usage
    5. What is Super Keyword?
    6. Super Keyword Practical Usage
    7. Importance of This Keyword
    8. Static and Non-Static Importance Code in Java
    9. Final Keyword in Java
    10. Packages and their Usage in Object Oriented Programming System (OOPS)
    11. Types of Packages and How they will Help in Real-Time?
    12. Importance of Access Modifiers
    13. Difference Between Public and Private Modifiers with Examples
    14. Different Kind of Exceptions
    15. Try Catch Mechanism to Handle Exceptions
    16. Importance of Finally Block in Java
  32. Chapter 32 : Core Java Tutorial - Part 3 - Collections Application Programming Interface (API)
    1. What are Java Collections?
    2. Implementation of Arrays List
    3. Examples of Array List
    4. Implementing Set Interface
    5. Examples of HashSet Using Iterator
    6. Implementing Map Interface
    7. Difference Between HashMap and HashTable (Interview)
    8. Practice Exercise Printing Unique Number- Amazon Interview Questions
  33. Chapter 33 : Cucumber Behavior Driven Data – Framework
    1. Cucumber Framework Design Plan
    2. Template for Writing Business Requirements
    3. Quality Assurance (QA) Role in Behavior Driven Development (BDD)
    4. Template for Writing Test Cases for Business Scenarios
    5. Advantages of Behavior Driven Development (BDD) and why it is Getting Popular?
    6. Cucumber Project Template
    7. Understanding Cucumber Dependencies
    8. Understanding Cucumber Framework Terminologies
    9. Mapping Step Definition to Feature File
    10. TidyGherkin Plug-in to Generate Step Definitions
    11. Running Tests with TestRunner
    12. Importance of Regular Expressions in Feature Files
    13. Reusing Functions with Variable Data
    14. Adding Cucumber Knowledge to an Existing Framework
    15. Create Selenium Feature Files with Step Definition Implementation
    16. Adding Page Objects and Handling Dynamic Pop-ups on the Home Page
    17. Parameterizing Selenium Tests with Cucumber
    18. Integrating Cucumber with TestNG and Maven
  34. Chapter 34 : GIT - Version Control Tutorial
    1. Introduction to GIT
    2. Importance of GitHub and its Uses
    3. Creating GIT Configuration and Repositories
    4. How to Push Code to a Remote Repository?
    5. Understanding Staging and Commit in GIT
    6. Adding Remote Repository and Push the Committed Code
    7. End-to-End Working Example on GIT Commands - 1
    8. End-to-End Working Example on GIT Commands - 2
    9. Importance of Branching in GIT
    10. How to Resolve Merge Conflicts with GIT?
  35. Chapter 35 : Cloud Testing Basics and Vendors that Support them
    1. Cloud Testing Basics and Vendors which Supports Them
    2. Sauce Labs Registration for Connectivity
    3. Running Selenium Test Cases on Cloud
  36. Chapter 36 : File Uploading (AUTO IT) and Downloading with Selenium
    1. Handling Window Authentication Pop-ups with Selenium
    2. Examples on Handling Pop-ups with Modified WebDriver Uniform Resource Locator (URL)
    3. What is AutoIT? Installation Details
    4. Inspecting the Window Objects and Converting into AutoIT Code
    5. End-to-End Example on Uploading Files with AutoIT Selenium
    6. Steps to Complete the Flow to Download a File from an Application with Selenium
    7. Chrome Driver Options to Configure the Download Path of a Browser
  37. Chapter 37 : End-to-End Testing Activities - Defect Tracking Tool
    1. Sample Application to Derive Test Cases
    2. Test Cases Continued for the E-commerce Application
    3. Test Execution for all Test Cases and Updating the Result Status
    4. Introduction to the Bugzilla Tool and Creating a Bug
    5. Adding More Details to a Bug by Understanding all the Fields

Product information

  • Title: Selenium WebDriver with Java - Basics to Advanced and Frameworks
  • Author(s): Rahul Shetty
  • Release date: November 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781789132908