Learn Selenium WebDriver with Java

Video description

Explore coding from scratch and learn Selenium WebDriver with Java, the TestNG framework, Page Object Model, and Page Factory Design

About This Video

  • Learn what logical and bitwise operators are in Java
  • Understand the difference between ‘if’ and ‘nested if’ conditional statements
  • Explore the concept of Garbage Collector (GC) and the Java 10 updates in GC

In Detail

This course is designed to guide you through Selenium WebDriver and Java, right from the basics to the advanced aspects. If you do not have prior knowledge of Java, you can start with the Java modules, which comprise the first few sections of the course. You can then start exploring the Selenium WebDriver videos after you’ve develop some fluency in Java. Remember, you do not need to go through all the sections in Java before starting with Selenium WebDriver, especially if you’re already familiar with Java. The first six sections of Java should be sufficient to get you ready to learn Selenium WebDriver.

As you go through the sections, you’ll get to grips with developing an automation framework using Page Object Model and Page Factory. Further on, the course will show you how to locate elements using CSS selectors. Later, you’ll build on your knowledge by working with the file system in Java. All along, the course follows an example-oriented approach, helping you learn through various real-time scenarios that are used to elaborate Java and Selenium WebDriver concepts.

By the end of this course, you’ll be well-versed with Selenium WebDriver and Java and be able to apply the knowledge you’ve gained in the real world.

Who this book is for

This course is for anyone, from fresh graduates looking to learn a new skill to QE managers who want to explore better automation solutions for projects.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Basic Concepts of Java Programming
    1. Introduction
    2. Java Development Kit (JDK) Installation
    3. Eclipse Integrated Development Environment (IDE) Installation
    4. Writing your First Java Program
    5. Primitive Data Types in Java
    6. Arithmetic Operators in Java
    7. Logical and Bitwise Operators in Java
    8. Relational Operators in Java
    9. Conditional Statements – If Condition
    10. Conditional Statements – Nested If Condition
    11. Loops – For Loop
    12. For Loop – Hands-On Exercise
    13. Loops - Nested For
    14. Nested For Loop – Hands-On Exercise
    15. Loops – While and Do While
    16. Loops – Break and Continue
  2. Chapter 2 : String Operations
    1. String Basics
    2. Comparing Strings
    3. Searching Strings
    4. Slicing Strings
    5. Replacing Strings
    6. Converting Strings
  3. Chapter 3 : Object-Oriented Programming
    1. What is Class and Object-
    2. Class and Object – Hands-on Exercise 1
    3. Methods in Java
    4. Method Overloading
    5. Access Specifiers - Modifiers
    6. Constructor
    7. Data Encapsulation
    8. Static Keyword
    9. Main Method
    10. Class and Object – Hands-on Exercise 2
  4. Chapter 4 : Special and Useful Classes in Java
    1. Math Class
    2. StringBuilder Class
    3. StringBuilder Method
    4. Scanner Class
    5. Random Class
    6. Universally Unique Identifier (UUID) Class
  5. Chapter 5 : New Stuff in Java 10
    1. var Keyword
    2. Concept of Garbage Collector (GC) and Java 10 Update in GC
    3. Other Updates in Java 10
  6. Chapter 6 : Inheritance, Abstraction, and Polymorphism
    1. Class Inheritance
    2. Method Overriding
    3. Polymorphism
    4. Super Keyword
    5. Superclass Constructor
    6. Protected Access Specifier
    7. Abstraction
    8. Interface
    9. Final Keyword
  7. Chapter 7 : Programming with Arrays in Java
    1. What is an Array-
    2. Array Object
    3. Enhanced For Loop for Array Iteration
    4. Array – Hands-on Exercise
    5. Two-dimensional (2D) Array
    6. Two-dimensional (2D) Array – Hands-on Exercise
    7. Array of Object
  8. Chapter 8 : Programming with Lists in Java
    1. ArrayList
    2. Structure of a Linked List
    3. LinkedList Class
    4. ArrayList versus LinkedList
    5. ListIterator
  9. Chapter 9 : Sets and Maps
    1. HashSet
    2. LinkedHashSet
    3. TreeSet
    4. Iterating on Sets
    5. HashMap
    6. TreeMap
    7. Iterating on Maps
  10. Chapter 10 : Regular Expressions
    1. Introduction to Regular Expressions (Regex)
    2. Quantifiers
    3. Character Classes
    4. Bracket Expressions
    5. OR Operator in Regular Expressions (Regex)
    6. Dot Operator in Regular Expressions (Regex)
    7. Greedy and Lazy Matching
    8. Regular Expressions (Regex) – Hands-on Exercise 1
    9. Regular Expressions (Regex) – Hands-on Exercise 2
    10. Regularizing Number Ranges
  11. Chapter 11 : Exception Handling
    1. What is an Exception-
    2. Error versus Exception
    3. Checked and Unchecked Exceptions
    4. Throws Declaration
    5. Try and Catch Block - Exception Handling
    6. Finally Block
  12. Chapter 12 : Date and Time Operations (Rev Java 8)
    1. Local Date and Time
    2. Custom Date and Time
    3. Future and Past Date
    4. Future and Past Time
    5. Date Difference
    6. Time Difference
    7. Date–Time Formatter
  13. Chapter 13 : Working with Text Files - Apache Commons Input/Output (IO)
    1. Reading Text File Using Apache Commons Input/Output (IO)
    2. Editing Text File Using Apache Commons Input/Output (IO)
    3. Interview Question – Sorting a Line from a Text File
    4. Copying and Moving Text Files
    5. Interview Exercise - Removing Duplicate Words from a Text File
  14. Chapter 14 : Working with Excel Files - Apache Poor Obfuscation Implementation (POI)
    1. Module Introduction
    2. Reading Excel using Poor Obfuscation Implementation (POI)
    3. Reading Excel Data in Two-dimensional (2D) Array
    4. Writing Excel using Poor Obfuscation Implementation (POI)
  15. Chapter 15 : Selenium WebDriver Introduction
    1. WebDriver Architecture
    2. Creating a Maven Project
    3. Configuring Selenium WebDriver with Maven
    4. ChromeDriver Setup
    5. Update: ChromeDriver Download
    6. Firefox (Gecko) Driver Setup
    7. Update: GeckoDriver Download
    8. Automating Browser Navigation (Back, Forward, Refresh, Navigate To)
    9. Getting Page Basic Details (URL, Title, and so on)
  16. Chapter 16 : Element Locaters
    1. HTML Basics
    2. Inspecting WebElements
    3. Finding Elements by ID and Link Text
    4. Finding Elements by Name and Class
  17. Chapter 17 : XPath
    1. ChroPath for Chrome
    2. Creating XPath Using Attributes
    3. Creating XPath Using Text
    4. XPath for Dynamic Elements
  18. Chapter 18 : XPath Axes
    1. XPath Using Parent–Child Relationship
    2. XPath Using Ancestor–Descendant Relationship
    3. XPath Using Preceding–Following Relationship
    4. Absolute XPath versus Relative XPath
  19. Chapter 19 : Cascading Style Sheets (CSS) Selectors
    1. Cascading Style Sheets (CSS) and Cascading Style Sheets (CSS) Selectors
    2. Creating Cascading Style Sheets (CSS) Selectors Using Attributes
    3. Cascading Style Sheets (CSS) Selectors for Dynamic Elements
    4. Creating Cascading Style Sheets (CSS) Selectors Using Multiple Attributes
    5. Advance Cascading Style Sheets (CSS) Selectors
    6. Creating Cascading Style Sheets (CSS) Selectors Using Child-Node Numbering
  20. Chapter 20 : Working with Element Collections
    1. Retrieving a Collection of WebElements
    2. Handling the WebElements Collection
    3. Visible versus Hidden WebElements
    4. WebElements within another WebElement
  21. Chapter 21 : Getting Details from Web Page for Validation Purpose
    1. Getting Basic Details
    2. Getting Cascading Style Sheets (CSS) Details
    3. Verifying if an Element is Visible and Enabled
    4. Verifying if an Element Exists
    5. Verifying if an Element is Selected
  22. Chapter 22 : Automating Special WebElements - Select Boxes, Datepickers, and Web Tables
    1. Working with Select Boxes
    2. Working with Multi Select Boxes
    3. Working with Datepicker
    4. Working with Web Tables
    5. Handling Objects within the Web Table Cells
  23. Chapter 23 : Automating Browser Pop-ups
    1. Handling Browser Pop-ups
    2. Working with Multiple Browser Windows
    3. Closing all Browser Pop-up Windows
    4. Close versus Quit
  24. Chapter 24 : Automating iFrames
    1. iFrames
    2. Nested iFrames
  25. Chapter 25 : Automating JavaScript Alerts
    1. JavaScript Basic Alert Box
    2. JavaScript Confirm Box
    3. JavaScript Prompt Box
  26. Chapter 26 : Automating Mouse Actions - Drag and Drop, Mouse Hover, Click and Hold, and so on
    1. Mouse Hover
    2. Right Click
    3. Drag and Drop
    4. Resizing UI Elements
    5. Slider
    6. Multi-key Operations
  27. Chapter 27 : Test Synchronization
    1. What is Test Synchronization-
    2. Implicit Wait
    3. Explicit Wait
  28. Chapter 28 : TestNG – Part 1
    1. Installing TestNG
    2. Automating the First Test in TestNG
    3. Assertions in TestNG
    4. Hard versus Soft Assertions in TestNG
    5. Installing the Vue CLI and Creating a New Project
    6. @BeforeClass and @AfterClass Annotations
    7. Managing Test Execution Using TestNG XML Files
    8. Including and Excluding Methods in an XML File
    9. @BeforeTest and @AfterTest Annotations
    10. @BeforeSuite and @AfterSuite Annotations
  29. Chapter 29 : Page Object Model (POM) and Page Factory
    1. Page Factory
    2. Elements Collection (List) in Page Factory
    3. Initializing Page Factory Elements
    4. Page Object Model (POM)
    5. Creating Base Class
    6. Creating Page Library
    7. Creating Flow Library
  30. Chapter 30 : TestNG – Part 2
    1. TestNG Groups
    2. TestNG Parameters
    3. Managing Test Dependencies in TestNG
    4. Ignoring Test Methods in TestNG
    5. Parallel Execution in TestNG
    6. TestNG Hypertext Markup Language (HTML) Reports
    7. Data Provider in TestNG
    8. Concluding Remarks

Product information

  • Title: Learn Selenium WebDriver with Java
  • Author(s): Mayur Deshmukh
  • Release date: November 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781800562592