Cover; Title Page; Copyright and Credits; Packt Upsell; Contributors; Table of Contents; Preface; Chapter 1: Introducing WebDriver and WebElements; Selenium Testing Tools; Selenium WebDriver ; Selenium Server; Selenium IDE; Differences between Selenium 2 and Selenium 3 ; Handling the browser ; Havin
Ultimate Selenium WebDriver for Test Automation
β Scribed by Robin Gupta
- Publisher
- Orange Education Pvt Ltd, AVAβ’
- Year
- 2024
- Tongue
- English
- Leaves
- 369
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Elevate your test automation skills by mastering Selenium with Java, delving into advanced techniques for a comprehensive understanding.
Key Features
β Step-by-step approach from fundamentals on Selenium testing to advanced concepts like Selenium Grid and framework development.
β Enriched with practical case studies from e-commerce, healthcare, EdTech, banking, and SAAS, to highlight Selenium's real-world web testing.
β Hands-on exercises and detailed code examples to ensure an engaging and accessible learning experience.
Book Description
This comprehensive and practical handbook, centered on Selenium unlocks its potential using Java. The book covers Selenium basics, including IDE and WebDriver, while delving into advanced topics like Selenium Grid and non-functional test automation. It will help you take your automation to the next level by gaining insights into creating Hybrid test automation frameworks with practical applications of TestNG. Real-world insights from industry leaders enrich the learning experience, transcending tool proficiency to strategic test automation and framework design. With practical examples and case studies from diverse sectors, including banking, healthcare, e-commerce, and SAAS, the book showcases Selenium's real-world applications.
By the end of the book you will extend Selenium's capabilities for Performance, Security, and Excel-based automation. The book will help you stay ahead in the ever-evolving field with insights into the latest updates, including Selenium Manager, BiDi protocol, network interception, relative locators, and Selenium's roadmap.
What you will learn
β Master the fundamentals of Selenium, including Locator strategies, Synchronization, and WebDriver, for effective web application testing.
β Explore handling Shadow DOM, JavaScript Executor, Page Objects, Screenplay pattern, and BDD with Cucumber for sophisticated testing techniques.
β Develop Hybrid test automation frameworks using Selenium, gaining practical insights with TestNG integration.
β Learn to scale tests across diverse environments using Selenium Grid, boosting overall testing efficiency.
β Enhance Selenium for Performance, Security, and Excel-based test automation.
β Grasp the latest Selenium updates, including Selenium Manager, BiDi protocol, network interception, relative locators, and Seleniumβs roadmap for staying ahead in the field.
β Explore innovative methods to integrate AI and machine learning seamlessly into your Selenium test automation process.
WHO IS THIS BOOK FOR?
This book is designed for anyone with a basic knowledge of Java and a curiosity about test automation with Selenium. This book is designed to be your companion in exploring the exciting world of Selenium, regardless of your professional background. It's perfect for those starting their journey in automated web testing, as well as for seasoned professionals looking to enrich their skill set.
β¦ Table of Contents
Cover Page
Title Page
Copyright Page
Dedication Page
Foreword
About the Author
About the Technical Reviewers
Acknowledgements
Preface
Errata
Table of Contents
1. Introduction to Selenium Test Automation
Introduction
Structure
Introduction to Selenium
Selenium: The Origin Story
Advantages of Selenium
Getting started with Selenium
Selenium IDE
Prerequisites
Test Automation using IDE
IDE Walkthrough
Debugging options
Command Palette
Target and Web elements
Additional Options
Conditional Logic
Exporting the code
Running on CLI
Key limitations and way forward
Conclusion
Exercise
2. Fundamentals of Test Automation
Introduction
Structure
Introduction to Quality
Software Testing
Supercharge your Quality Journey with Automation
Test Automation Strategy
Test Designing for Automation
Test Design Methodologies
Risk-Based testing
Pair-wise Testing
Test Execution and Logging
Logging
Importance of Logging
Reporting and Measurements
Test Automation Coverage
Conclusion
Exercise
3. Selenium WebDriver Basics
Introduction
Structure
WebDriver Architecture
Prerequisites
Setup and Basic Interaction
Locators and Web Elements
WebElement
Different Locator Strategies
Xpath Locators
Attributes
Axes
Operators
CSS locators
Interactions with Web Elements
click
isDisplayed
isEnabled
getAttribute
getText
sendKeys
clear
Handling Frames and Windows
iframes
Window Management
Common HTML Elements
Table
Select
Drag and Drop
Calendar
Form Submissions and File Uploads
Few Use Cases on Automation
Web Scraping for Fun
Automated Price Tracker
Virtual Plant Nurturer
Conclusion
Exercise
4. Advanced Selenium Techniques
Introduction
Structure
Synchronization and Wait Strategies
Waiting Strategies
Implicit Waits
Explicit Waits
Fluent Waits
Shadow DOM
Animations and moving elements
JavaScript Executor
Page Objects
Page Factory
Page Object limitations
ScreenPlay pattern
Comparison of Screenplay and Page Object Design Patterns
Page Object Pattern
Screenplay Pattern
Conclusion
Exercise
5. Test Automation Framework
Introduction
Structure
Framework Basics
Design Patterns
Factory Design Pattern
Single Responsibility Principle (SRP)
Reflection in Java
Maven
POM file
Directory Structure of a Maven Project
Maven Commands
TestNG
Installation
Annotations and their Execution Order
Running and Debugging TestNG tests
@Factory and @DataProvider
testng.xml and Parallel execution
Assertions
assertEquals
assertNotEquals
assertTrue
assertFalse
Test Reporting
Logging
Installation
Configuration
Log Levels
Building a Framework
Folder structure
Code smells
Building blocks of framework
WebDriver Factory Class
PageFactory Class
BaseTest Class
PageBase Class
Creating Automated Tests
Running tests via TestNG or Maven
Continuous Integration/Continuous Delivery
Benefits of CI/CD
Tools and Usage
Conclusion
Exercises
6. Distributed Test Automation
Introduction
Structure
Cross-browser Compatibility
Handling Browser-Specific Behaviors
Handling Chrome Browser Issues Using Selenium
ChromeOptions
ChromeDriverService
Certificates
Popups
Headless Mode
Mobile Emulation
Localization
Improve loading times
Selenium Grid
Setup and installation
Grid architecture
Roles of Selenium Grid
Standalone
Hub and Node
Fully distributed
Security
Conclusion
Exercise
7. SAAS and Non-functional Test Automation
Introduction
Structure
Basics of a SAAS Application
Dissecting Web Application Layers
Letβs Get Dissecting!
Test automation for SAAS
Test Pyramid
The Role of Non-Functional Testing
Limitations and Moving Forward
Performance Analysis
Installation
Test Authoring and execution
Security Testing
OWASP and ZAP
ZAP and Selenium
Setup and Pre-requisites
Conclusion
Exercise
8. BDD with Selenium
Introduction
Structure
Behavior Driven Development
Gherkin and Cucumber
Gherkin
Cucumber
Pre-requisites and installation
Feature file
Hooks
Step Definition
Runner
Cucumber properties file and reports
Tips for Cucumber
Conclusion
Exercise
9. New Features in Selenium 4
Introduction
Structure
History of Selenium (again)
Support for BiDi and CDP
Chrome DevTools Protocol
DOM mutation
Browsing Context
Console logs
Network Interception
Website Performance Metrics
Relative locators
Geolocation Emulation
Crucial updates
Conclusion
Exercise
10. Conclusion
Introduction
Structure
Test Maintenance
ROI for Test Automation
Extending Selenium with Excel
Apache POI Installation
Reading Values from Excel
Data-driven Frameworks
Keyword-driven Frameworks
Hybrid Frameworks
Bonus Components
Roadmap for Selenium
Conclusion
Exercise
11. Way Forward
Introduction
Structure
Usage of AI in Test Automation
Prompt Engineering
Impact of AI in the field of Test Automation
Git Basics
Key Concepts of Git
Essential Git Commands and their Usage
Git Workflow
Open-Source Community of Selenium
Technical Contributions
Beyond Tech: Enriching the Community in Varied Ways
Conclusion
Index
π SIMILAR VOLUMES
Solve your Selenium WebDriver problems with this quick guide to automated testing of web applications with Selenium WebDriver in C#. This third editioncontains hundreds of solutions to real-world problems, with clear explanations and ready-to-run Selenium test scripts that you can use in your own pr
Solve your Selenium WebDriver problems with this quick guide to automated testing of web applications with Selenium WebDriver in C#. This third editioncontains hundreds of solutions to real-world problems, with clear explanations and ready-to-run Selenium test scripts that you can use in your own pr
<p><span>Real-world examples of cross-browser, mobile, and data-driven testing with all the latest features of Selenium WebDriver 3</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Unlock the full potential of Selenium to test your web applications</span></span></li><li><span><span>Us