Playwright for Selenium Developers
Main Speaker:
Itai Agmon
Tracks:
QAGeekWeekSeminar Categories:
AutomationQA
QAGeekWeek
Course ID:
50903Date:
23/06/2024Time:
Daily seminar9:00-16:30
Location:
Daniel Hotel, HerzliyaOverview
This course is meticulously crafted to empower Selenium/Webdriver developers with the transformative capabilities of Playwright, an advanced end-to-end testing library revolutionizing automated testing for contemporary web applications. Unlike its predecessors, Playwright boasts unparalleled advantages, offering seamless automation of browser interactions and enabling comprehensive cross-browser testing with unprecedented efficiency. Emphasizing the utilization of TypeScript, this course equips Java/C#/Python developers with the adeptness to harness Playwright’s prowess, enabling the creation of resilient, scalable, and effortlessly maintainable automated tests.
Prerequisites
- Proficiency in any programming language
- Basic understanding of web development concepts (HTML, Chrome Developer Tools)
- Familiarity with Selenium / WebDriver testing principles (XPath, CSS Selectors)
Course Contents
Introduction to Playwright
- Overview of Playwright and its advantages
- Playwright under the hood (CDP VS. WebDriver)
- Auto-waiting mechanism
TypeScript for Java/C#/Python Developers
- Introduction to Node, npm and package.json
- Const, Let and Var
- Classes and interfaces in TypeScript
- Relations between classes
- Promises and await
Playwright Basic Usage
- Setting up a Playwright project with TypeScript
- Recording basic Playwright script
- The magic of trace files
- Recording videos
- Basic API (Playwright, Browser, Context, Page)
- Interacting with elements with locators
- Finding element with selectors
- Asserting with expect library
Playwright Advanced Usage and Events
- Working with multiple browsers and browser contexts (saving context state)
- Waiting for different events (console, download, alerts, etc..)
- Working with network events (logging, waiting, mocking)
Playwright Test Runner
- Running tests from the command line
- The power of the UiMode
- Reporters (HTML, List, Custom)
- Fixtures in playwright.
- Parallel execution and sharding
- Visual Comparison
Writing Maintainable Tests with Page Objects
- Introduction to Page Object Model (POM)
- Implementation of page classes in TypeScript