Web Automation Testing Using Playwright
Author | : Kailash Pathak |
Publisher | : BPB Publications |
Total Pages | : 424 |
Release | : 2024-12-13 |
ISBN-10 | : 9789365898002 |
ISBN-13 | : 9365898005 |
Rating | : 4/5 (02 Downloads) |
Book excerpt: DESCRIPTION The purpose of the book Web Automation Testing Using Playwright is to teach you how to use Playwright to automate your web testing. Playwright, a powerful automation tool developed by Microsoft, is a modern web automation framework that is fast, reliable, and easy to use. This book begins by introducing automation testing, its benefits, and Playwright, covering setup, scripting, and Playwright's architecture. It guides you through creating frameworks, selector strategies, and handling complex web elements like shadow DOM and iframes. Explore Playwright features such as Codegen, Inspector, UI mode, debugging with Trace Viewer, and generating detailed reports. Learn advanced techniques like building frameworks using Page Object Model (POM), integrating Cucumber/BDD, API testing, HTTP request interception, and accessibility and visual testing. Additionally, the book explores test execution in CI/CD tools, parallel testing, AI-driven test automation, leveraging generative AI like ChatGPT, and future trends in test automation. By the end of this book, you will be a web automation expert, writing efficient tests that validate web app functionality. Automate complex scenarios, handle edge cases, and leverage AI for intelligent testing. KEY FEATURES ● Master the intricacies of Playwright's architecture, features, and best practices. ● Learn how to apply Playwright to automate real-world web applications. ● Tips, tricks, and best practices for efficient and effective web automation using Playwright. WHAT YOU WILL LEARN ● Writing testing scripts for end-to-end, functional, API, accessibility, and visual tests with Playwright. ● Mastering UI elements like alerts, tabs, drag-and-drop, iframes, and shadow DOM handling. ● Debugging effectively using Playwright features like Codegen, Inspector, UI mode, and Trace Viewer. ● Implementing Cucumber/BDD, Page Object Model (POM), and CI/CD pipeline integration with Playwright. ● Leveraging AI tools for test automation, including script creation, debugging, and understanding generative AI like ChatGPT. WHO THIS BOOK IS FOR The target audience for this book is test automation engineers, web developers, product owners, and anyone who wants to learn about tool Playwright and test their application from scratch to the end of the applications. TABLE OF CONTENTS 1. Introduction to Playwright 2. Getting Started with Playwright 3. Locator Strategies and Handling Various Actions 4. Handling Complex Elements 5. Exploring Playwright Tools in Depth 6. Reporter, Assertion, Annotations, and Hooks in Playwright 7. Page Object Model Pattern in Playwright 8. Playwright Cucumber/BDD Framework Integration 9. API Testing Using Playwright, Authentication, and Session Storage 10. Accessibility Testing with Playwright 11. Visual Testing with Playwright 12. Integrate Playwright Tests with CI/CD and Run Tests in Parallel 13. Using AI with Playwright for E2E Testing