Overview
The course is designed to help you master the Playwright framework for browser automation. You will learn how to efficiently write, execute, and manage tests, covering everything from basic concepts to advanced functionalities. The course includes hands-on instruction to guide you in building robust and maintainable test scripts for modern web browsers. By the end of the training, you will have a solid understanding of Playwright and how to apply it in real-world scenarios.
Duration
The course is valid for 45 days (Online Portal).
Location
Online (Self-paced modules with videos, quizzes, and assignments).
Intended Audience
- Manual testers, non-programming aware testers interested in learning Automation
- University Graduates who want to kick start their career in IT
- Professionals from different backgrounds interested in learning Automation
- Professionals who have a basic understanding of programming concepts
Detailed Program Structure
Course Overview
- Get oriented with automation fundamentals and how Playwright fits into the modern test automation landscape.
- Overview of the Playwright course
- Agenda and learning objectives
- When to automate?
- How to automate?
- A simplified view of test automation economics
- Commonly used automation tools
Introduction to Playwright
- What is Playwright?
- Key features and capabilities
- Playwright architecture
- Comparison with Cypress
- Comparison with Selenium WebDriver
Installing Playwright
- Prerequisites for installing Playwright
- Playwright setup and project initialization
- Configuring browser settings
Creating and executing your first test script
Hands-on practice with writing and executing your first test using Playwright.
- Common automation terminologies
- Creating the first Playwright script using Codegen
- Structure of a Playwright test
- Executing your first test
- Viewing default HTML reports
- Running tests in slow motion
- Recording tests from the terminal
Object recognition
Master techniques for identifying and interacting with web elements.
- Locators in Playwright – identifying web elements
- Using XPath and CSS examples
- Building XPath for different elements
- Identifying elements by role, label, alt text, placeholder, and visible text
Assertions in Playwright
Learn how to validate test outcomes using built-in assertions.
- What are assertions?
- Built-in assertion strategies in Playwright
- Auto-retrying and non-retrying assertions
- Negating matchers
- Soft assertions
- Custom expect messages
- Advanced assertion functions:
expect.config,expect.poll,expect.toPass
Handling elements
Explore user interactions and form element automation.
- Input box automation
- Single and multi-select dropdowns
- Assertions with dropdowns
- Radio button handling
- Checkboxes (with and without assertions)
- Working with frames
- Accessing nested iframes
- Working with tables and paginated data
- Mouse and keyboard actions
- Handling browser dialogs (alert, confirm, prompt)
- Browser window and notification handling
- Live execution demonstrations
Javascript basics
Get comfortable with JavaScript essentials required for Playwright scripting.
- Introduction to JavaScript in Playwright context
- JavaScript fundamentals: variables, loops, functions, data types
Getting dynamic data values
Learn how to implement data-driven testing using external data sources like JSON and CSV files.
- Data-driven testing using JSON & CSV files
- Creating and reading a JSON file for test data
- Accessing JSON contents inside test cases
- Using test data from a JSON file within test scripts
- Creating a CSV file for test input
- Understanding CSV structure and its use in tests
- Reading CSV contents within a test method
- Executing data-driven tests with multiple datasets
Annotations & tags
Understand how to control and categorise your Playwright tests using annotations and tags.
- Introduction to annotations
- Using
test.only()to run a specific test - Using
test.skip()to skip a test conditionally - Using
test.slow()to mark tests as slow - Executing scripts with annotations
- Introduction to tagging tests
- Adding tags to test cases with examples
- Running tests selectively using tags
Hooks & groups
Leverage hooks for setup and teardown and learn how to group related tests for better structure.
- Introduction to Playwright test hooks
- Using
beforeEach()andafterEach() - Using
beforeAll()andafterAll()for global setup/teardown - Introduction to test grouping
- Writing grouped test examples
- Executing grouped tests effectively
Env file configuration
Learn how to use environment files for configuration management in Playwright.
- About
.envfiles and Playwright configuration - Storing and managing environment-specific values
Exception handling
Explore techniques to handle errors and ensure resilient Playwright scripts.
- What is an exception in automation testing?
- Common runtime exceptions in Playwright
- Using try-catch blocks to manage failures
- Practical example of try-catch in Playwright
- Logging and debugging failed scenarios
- Examples of logging/debugging implementation
- Implementing retry mechanisms for flaky tests
- Retry mechanism usage with examples
- Handling asynchronous operations and promises
- Best practices to manage exceptions in test automation
Playwright reporting
Understand the importance of reporting in test automation and learn how to generate, customise, and use reports in Playwright.
- Why reporting is essential in automation
- Key factors to consider when choosing reporting tools
- Overview of different types of reporting
- Using Playwright’s built-in reports
- Steps to generate built-in reports
- Creating and viewing HTML reports
- Custom report generation techniques
- Example of custom reporting
- Introduction to Allure reports
- Structure and components of Allure reports
- Installing and integrating Allure package in Playwright
- Generating and viewing Allure reports
- Advantages of using Allure reporting
Playwright trace viewer
Learn how to use Playwright’s Trace Viewer for debugging and analysing test executions.
- Why use Playwright Trace Viewer?
- Recording a trace during test execution
- How to navigate and use the Trace Viewer interface
- Key elements and features of the Trace Viewer
- Recording trace via terminal commands
Framework architecture
Understand the architectural structure behind a scalable Playwright automation framework.
- Overview of Playwright framework architecture
Types of automation frameworks
Explore different types of test automation frameworks and when to use them.
- Introduction to automation frameworks
- Benefits of using a framework in test automation
- Types of frameworks:
- Linear automation framework
- Modular based testing framework
- Library architecture testing framework
- Data-driven framework
- Keyword-driven framework
- Hybrid testing framework
- BDD framework
BDD – Cucumber
Learn Behavior-Driven Development with Cucumber and how it integrates with Playwright.
- What is Cucumber?
- Key features and advantages of BDD
- Why use Cucumber with Playwright
- Introduction to Gherkin syntax (Given/When/Then)
- Example of writing BDD test scenarios
- Installation and setup of Cucumber with Playwright
Object repository
Understand the concept and implementation of object repositories in automation.
- What is an object repository?
- Real-world analogy to explain object repositories
- Implementing object repository in Playwright
- Benefits of maintaining centralised object locators
Page object model (POM)
Learn the Page Object Model design pattern for better test maintenance and reusability.
- Introduction to POM and its significance
- Advantages of using POM in large projects
- Recommended project folder structure using POM
- Writing sample test using POM in Playwright
- Execution and demonstration of POM-based tests
API testing with Playwright
Leverage Playwright’s API capabilities for integrated UI and API testing.
- What is API testing?
- Common HTTP methods used in testing:
- GET
- POST
- PUT
- DELETE
- Basic structure of API tests in Playwright
- Validating responses and status codes
- Logging and error inspection in UI mode
- Real-time test examples combining UI and API checks
Highlights of the program
- By end of this course, you will be mastered on Playwright
- Case study – hands-on training on real applications
- Specialised trainers to answer queries
- Post-training assessment test (30 min)
- With all this knowledge gained, you should be easily able to clear Playwright automation interviews
- Learning from experienced professionals who provide real-world insights and practical advice
