Selenium WebDriver 4 with Java - Zero To Hero

Video description

Selenium WebDriver is an open-source automation tool that works easily across multiple OS and browsers and supports multiple frameworks. There is no doubt that these qualities have made Selenium WebDriver one of the most powerful tools to test web applications. This course will teach you the essential Selenium WebDriver skills that will help you start your career in automation testing.

This course starts by taking you through the basics of Selenium WebDriver and helping you with the installation process of Java. Next, you will get a solid understanding of Java concepts and the TestNG framework. Moving along, you will learn to work with advanced reporting and use log47 to log messages. Next, you will get to grips with the page object model, page factory, and data-driven framework, and execute tests on a remote machine using Selenium Grid 2.0.

Later, you will learn to use Maven to manage builds and implement continuous integration with Jenkins. Toward the end, you will learn to execute database and performance test cases and run behavior-driven testing using Cucumber and Gherkin.

By the end of this course, you will have all the necessary skills needed to perform automation testing on web applications with Selenium WebDriver using Java.

What you will learn

  • Perform cross-browser testing using Selenium Grid
  • Implement continuous integration testing using Jenkins
  • Verify data integrity with the GUI of the application
  • Create attractive reports using the advanced reporting tool
  • Run performance tests with Selenium WebDriver automation
  • Find out how to convert Selenium test to Cucumber

Audience

Whether you are new to software testing or an experienced quality assurance professional who is looking to learn Selenium to step into automation testing, this course is for you. Prior experience in automation or coding is not required as every topic in this course is taught from scratch.

About the Author

Let's Kode It Kode It: Let's Kode It is here with a mission to teach everyone a new skill—doing what they have always wanted to do. They are a group of software professionals with more than 10 years of expertise in different areas of software industries and working as team leads in multinational companies. All their instructors have a master's degree from reputed universities. Their expertise lies in various fields of Software Development Life Cycle (SDLC)—from application development and testing to system administration.

Be it programming or creating a professional-looking MS Word document, they believe anyone can code and coding is not something out of this world. Coding can be of different types and in different areas: some may want to become a web developer, where it's all about front-end languages; some may choose to become a back-end developer; while others may choose to become hands-on testers with automation, where the domain is completely different from development.

They believe you only need to be willing to learn and everything else follows. They excel from software inception to implementation. Their goal is to offer high-quality technology courses, which will suit a newbie as well as an intermediate. They focus on technology, which is essential in order to perform in today's job market.

Table of contents

  1. Chapter 1 : Selenium Introduction
    1. Course Outcome
    2. Instructor Introduction
    3. Why Selenium?
    4. Selenium WebDriver Architecture - How the WebDriver Works?
    5. How to Reach Me Anytime and Ask Questions
  2. Chapter 2 : Setup and Installation of Required Tools and Plug-Ins
    1. Java Overview and Version Selection
    2. Java Install and Setup - Mac
    3. Java Install and Setup - Windows
    4. Installing Eclipse – Windows
    5. Eclipse Installation – Mac
    6. Maven Download and Setup – Windows
    7. Maven Download and Setup – Mac
    8. Installing Maven Plug-in In Eclipse
  3. Chapter 3 : Java Concepts - Data Types
    1. First Program and Some Tips
    2. Variables and Data Types
    3. Default Variable Values
    4. Reference Data Type - Strings Example
    5. String Methods - Part 1
    6. String Methods - Part 2
    7. Arrays
  4. Chapter 4 : Classes and Methods – Object-Oriented Concepts
    1. Methods Introduction
    2. Methods - Practical Example
    3. Understanding Return Type
    4. Class Introduction
  5. Chapter 5 : Getters and Setters - Practical Examples
    1. Getters-Setters and This Keyword - Part 1
    2. Getters-Setters and This Keyword - Part 2
    3. Getters-Setters and This Keyword - Part 3
    4. Constructors
  6. Chapter 6 : Selenium WebDriver – Setup
    1. Environment Setup and First Project Creation
    2. First Project Creation Using Maven
    3. How to Add Selenium WebDriver JavaDoc
    4. Selenium 4 New Syntax
  7. Chapter 7 : Selenium WebDriver - Running Tests on Various Browsers
    1. Running Tests on Firefox
    2. Running Tests on Google Chrome
    3. Running Tests on Edge
    4. Requirements to Run Tests on Safari
    5. Running Tests on Safari
    6. Setting Drivers in the System Path – Mac
    7. How to Set Drivers in the System Path – Windows
    8. How to Use Selenium Manager
    9. Interview Questions
  8. Chapter 8 : How To Inspect Elements On Different Browsers
    1. Introduction
    2. How to Inspect Elements Using Firefox DevTools?
    3. Inspecting Elements Using Chrome DevTools
    4. SelectorsHub Installation
    5. How to Use SelectorsHub
    6. Tricks to Generate XPath
    7. Best Element Inspect Tool
    8. How to Inspect Disappearing Elements
  9. Chapter 9 : Multiple Ways to Locate Elements
    1. Finding Elements Using id and XPath
    2. Finding Elements Using Name
    3. Finding Elements Using LinkText and PartialLinkText
    4. Finding Elements Using Class Name
    5. Finding Elements Using TagName and Interview Question
  10. Chapter 10 : Cascading Style Sheets (CSS) Selectors - Advanced Locators
    1. Using Id with Cascading Style Sheets (CSS) Selectors to Find Elements
    2. Using Multiple Cascading Style Sheets (CSS) Classes to Find Elements
    3. Using Wildcards with Cascading Style Sheets (CSS) Selectors
    4. Finding Child Nodes using Cascading Style Sheets (CSS) Selectors
  11. Chapter 11 : XPath - Advanced Locators
    1. Difference Between Absolute and Relative XPath
    2. Building an Effective XPath
    3. Using Text to Build an Effective XPath
    4. Building XPath Using the Contains Keyword
    5. Building XPath Using the Starts-With Keyword
    6. Finding Parent and Sibling Nodes
    7. Exercise with Solution + Interview Question
  12. Chapter 12 : Selenium WebDriver - Working with WebElements
    1. JUnit Introduction
    2. Clicking and Typing on a Web Element
    3. Navigating Between Webpages
    4. Finding the State of a WebElement (Disabled and Enabled Elements)
    5. Working with Radio Buttons and Checkboxes
    6. Working with a List of Elements
    7. Understanding Drop-Down Elements
    8. Working with a Drop-Down Element
    9. Understanding Multiple Select Elements
    10. Working with Multiple Select
    11. How to Work with Hidden Elements
    12. Working with Hidden Elements
  13. Chapter 13 : Working with Profiles and Options
    1. Firefox Profiles Introduction
    2. Using Firefox Profile in Web Automation Codes
    3. Chrome Options - Bringing Up Chrome with Extensions
  14. Chapter 14 : Selenium WebDriver - Useful Methods and Properties
    1. Getting the Text on an Element
    2. Getting Value of an Element Attribute
    3. Generic Method to Find Elements
    4. Generic Method to Find Element List
    5. Checking Whether the Element Is Present
    6. Generic Methods - Code Refactoring
  15. Chapter 15 : Selenium WebDriver - Wait Types - Handling Synchronization Issues
    1. Implicit Wait Versus Explicit Wait
    2. Implicit Wait
    3. Explicit Wait
    4. Generic Method to Work with Explicit Wait - Part 1
    5. Generic Method to Work with Explicit Wait - Part 2
    6. Interview Questions
  16. Chapter 16 : Selenium WebDriver - Advanced Interactions
    1. Calendar Selection - Working with Date Pickers
    2. Calendar Selection – Practical Example
    3. Calendar Selection – Real-Time Example
    4. AutoComplete - Working with Dynamic Dropdowns
    5. AutoComplete - Additional Examples
    6. How To Take Screenshots
  17. Chapter 17 : Selenium WebDriver - JavaScript Execution
    1. Executing JavaScript Commands
    2. Finding the Size of the Window
    3. Scrolling Element into View
    4. Clicking Element Using JavaScript Execution - Part 1
    5. Clicking Element Using JavaScript Execution - Part 2
  18. Chapter 18 : Selenium WebDriver - Switch Window and iFrames
    1. Switching Window Focus
    2. Switching to Window
    3. Working with iFrames
    4. Switching to iFrame
    5. Handling JavaScript Pop-Up
  19. Chapter 19 : Selenium WebDriver - Working with Actions Class
    1. Mouse Hover Actions
    2. Dragging and Dropping an Element on a Webpage
    3. Working with Sliders Actions
  20. Chapter 20 : Selenium WebDriver - Keypress Events
    1. Introduction
    2. Pressing Keyboard Keys
    3. Sending a Key Combination
    4. Keypress Events Using Actions Class
  21. Chapter 21 : Popular Interview Questions - Selenium WebDriver Exceptions
    1. NoSuchElementException
    2. Element Not Clickable at Point Exception
    3. Stale Element Exception - Part 1
    4. Stale Element Exception - Part 2
    5. Element Not Interactable Exception
  22. Chapter 22 : Automation Framework
    1. Automation Framework Introduction
    2. Page Object Model (POM)
    3. Creating Object Repository and Page Class
    4. Page Factory
    5. Finding All Links on a Webpage – BONUS
  23. Chapter 23 : Logging Infrastructure - Using Log4j2
    1. Log4j2 Introduction
    2. Using the Default Configuration
    3. Using Configuration File - Console Logging
    4. Using Configuration File - File Logging
    5. Working with Custom Loggers
    6. Test Case Example using Log4j2
  24. Chapter 24 : TestNG Setup
    1. TestNG Introduction
    2. TestNG Setup
    3. Adding TestNG Javadoc to Eclipse
  25. Chapter 25 : TestNG - Annotations and Assertions
    1. First TestNG Class - Test Annotation
    2. TestNG Asserts
    3. TestNG Soft Asserts
    4. Method and Class Annotations
    5. Running a Test Suite
    6. @BeforeSuite and @AfterSuite Annotations
    7. @BeforeTest and @AfterTest Annotations
  26. Chapter 26 : TestNG - Advanced Features
    1. Prioritizing Test Methods in a Desired Sequence
    2. Grouping Test Methods - Part 1
    3. Grouping Test Methods - Part 2
    4. Understanding Dependent Test Methods
    5. Disabling and Adding Timeout to Test Methods
    6. Preserving Order of Execution
  27. Chapter 27 : TestNG - Parameters and Parallel
    1. Providing Parameters to the Test Methods
    2. Running Tests, Classes, and Methods in Parallel
  28. Chapter 28 : TestNG - Parameters and Parallel - Practice Exercise
    1. TestNG Practice Exercise Question
    2. Practice Exercise Solution - Selenium WebDriver Practical Example
  29. Chapter 29 : TestNG - DataProviders
    1. DataProviders - Part 1
    2. DataProviders - Part 2
  30. Chapter 30 : TestNG - ITestResult
    1. ITestResult Interface
    2. Taking a Screenshot on Failure
  31. Chapter 31 : TestNG - Listeners
    1. IInvokedMethodListener
    2. ITestListener
    3. ISuiteListener
    4. TestNG Listeners - Code Refactoring
  32. Chapter 32 : TestNG - Reporter Logs and Hypertext Markup Language (HTML) Reports
    1. TestNG Reporters and Logs
  33. Chapter 33 : Extent Reports - Advanced Reporting
    1. Advanced Reporting Introduction and Features
    2. Advanced Reporting - Practical Example
    3. Attaching Screenshots to Advanced Reports
    4. Multiple Test Cases
    5. Reporting with Page Object Model (POM)
    6. Exercise with Solution
  34. Chapter 34 : Selenium WebDriver – Data-Driven Testing
    1. Data-Driven Testing Setup
    2. Reading Data from an Excel File
    3. Reading Multiple Datasets from an Excel File
    4. Multiple Datasets Test Case - Practical Example
    5. Writing Data to an Excel File
  35. Chapter 35 : Selenium WebDriver - File Upload and Windows Authentication
    1. Uploading Files on Windows – Robot
    2. Uploading Files on Mac – Robot
    3. AutoIT Installation and Finder Tool
    4. Uploading Files on Windows – AutoIT
    5. Handling Windows Authentication Using AutoIT
  36. Chapter 36 : WebDriver Event Listener
    1. WebDriver Event Listener - Part 1
    2. WebDriver Event Listener - Part 2
  37. Chapter 37 : Cross-Browser Testing Using Selenium Grid 2.0
    1. Selenium Grid Introduction
    2. Hub and Nodes Configuration - Part 1
    3. Hub and Nodes Configuration - Part 2
    4. Grid Configuration Using JSON File - Part 1
    5. Grid Configuration Using JSON File - Part 2
    6. Running Test Cases on the Selenium Grid Environment
    7. Real-Time Practical Example of Selenium Grid
  38. Chapter 38 : Build Management with Maven
    1. Maven Features and Advantages
    2. Creating and Importing a Maven Project
    3. Maven Local and Central Repositories
    4. Project Object Model (POM) Explanation - Core of Maven
    5. Building Lifecycle and Maven Commands
    6. Maven Project Migration
    7. Maven TestNG Integration and Maven Profiles
    8. Finding TestNG Reports in Maven
  39. Chapter 39 : Git and GitHub - Version Control System
    1. Git and GitHub Introduction
    2. Git Installation on Windows
    3. Git Installation on macOS
    4. Creating Local Git Repository - Staging and Commit
    5. File Check In - GitHub Remote Repository
    6. Advantages and Importance of Git Branches
    7. File Check In and Resolve Merge Conflicts – Real-Time Example
    8. Course Code Files on GitHub
  40. Chapter 40 : Continuous Integration with Jenkins
    1. Jenkins Features and Advantages
    2. Jenkins Prerequisites
    3. Jenkins Setup and Installation - Generic WAR File
    4. Jenkins Setup and Installation - Windows
    5. Jenkins Setup and Installation - macOS
    6. Jenkins Configuration
    7. Securing Jenkins
    8. Jenkins Plug-Ins Management
    9. Building a Freestyle Project Using Jenkins
    10. Building a Remote Project Using Git and Jenkins
    11. Jenkins Scheduling Builds on a Git Repository
  41. Chapter 41 : Selenium WebDriver Interview Questions - Real-Time
    1. Cracking Selenium WebDriver Interviews - Part 1
    2. Cracking Selenium WebDriver Interviews - Part 2
  42. Chapter 42 : Database Testing
    1. Testing MySQL and Oracle
    2. Testing MongoDB
  43. Chapter 43 : Performance Testing
    1. Performance Testing Going the System Way
    2. Performance Testing Using a Stopwatch
  44. Chapter 44 : Sauce Labs Integration
    1. Sauce Labs Introduction
    2. Getting the Access Key
    3. Sauce Labs Practical Example
  45. Chapter 45 : Selenium IDE/WebDriver - Basics
    1. Installing Selenium IDE and Writing Your First Script
    2. Generating WebDriver Code Using Selenium IDE
    3. Assert Versus Verify - Selenium IDE Commands
  46. Chapter 46 : Conditional Statements and Loops
    1. Conditional Statement
    2. Switch Statement
    3. While Loop
    4. For Loops
  47. Chapter 47 : Static Keyword
    1. Static Keyword - Part 1
    2. Static Keyword - Part 2
  48. Chapter 48 : Practice Exercise with Solution + Interview Question
    1. Practice Exercise with Solution + Interview Question
    2. Practice Exercise + Interview Question - Reverse Characters of a String
    3. Practice Exercise + Interview Solution - Reverse Characters of a String
  49. Chapter 49 : Java Concepts - Object-Oriented Programming Concepts
    1. Inheritance
    2. Access Modifiers and Packages
    3. Abstract Class - Abstraction Part 1
    4. Interface - Abstraction Part 2
    5. Method Overloading
    6. More on Method Overloading
    7. Method Overriding
  50. Chapter 50 : Handling Exceptions
    1. Handling Exceptions – Checked
    2. Handling Exceptions – Run Time
    3. Reading Properties File
  51. Chapter 51 : Java Advanced - Collections Framework
    1. ArrayList
    2. LinkedList
    3. ArrayList Versus LinkedList
    4. Sets
    5. Maps
    6. Different Kinds of Maps

Product information

  • Title: Selenium WebDriver 4 with Java - Zero To Hero
  • Author(s): Let's Kode It Kode It
  • Release date: May 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789137194