#17 Digest
This week’s lineup dives into smarter Playwright testing with sharper locator strategies, seamless auth handling, and a deep look at migrating from Selenium without the headache. We’re also unpacking how to keep your E2E code clean in monorepos and exploring best practices for screenshots across browsers and devices. Get ready for some solid tips and fresh perspectives to level up your Playwright game.
Explore First: Why the Agent Looks Before It Writes
This article explains an AI-driven explore-first approach for generating reliable Playwright page objects and API schemas by having an AI agent interact with real web pages and APIs through a CLI, improving accuracy over traditional guesswork.
Migrating from Selenium to Playwright: The Complete Guide
This comprehensive guide details how to migrate from Selenium to Playwright, covering the technical differences, migration strategies, infrastructure setup, async patterns, CI integration, and the use of AI tools for conversion.
Taking Screenshots in Node.js: Puppeteer, Playwright, and API Methods
This detailed tutorial compares three methods of taking screenshots in Node.js—Puppeteer, Playwright, and screenshot APIs—providing code examples and practical insights, with strong focus on Playwright's capabilities including cross-browser support, device emulation, and auto-waiting features.
How I Defeated ProseMirror: The Only Way to Programmatically Insert Text Into Rich Text Editors
The article explains a reliable method using document.execCommand('insertText') to programmatically input text into rich text editors like ProseMirror via Playwright automation, overcoming common pitfalls with other methods.
Automagically handling auth dependencies in Playwright
This article explores a refined approach to handling authentication in Playwright test suites by embedding auth logic directly into fixtures, eliminating setup dependencies, reducing flakiness, and improving scalability and maintainability.
Stop Treating Locators as Strings: A More Resilient Locator Strategy in Playwright
This article presents a structured, resilient locator strategy for Playwright testing, emphasizing locator contracts that prioritize user-facing semantics, explicit scoping, and controlled fallback for more maintainable and less brittle UI automation.
Why Separating QA Code from Dev Code in Your Monorepo is a Game-Changer for E2E Testing
This comprehensive article presents an architectural approach to E2E testing with Playwright, emphasizing separation of QA and dev code in monorepos, the Page Object Model, flakiness mitigation, environment management, API client generation, global setup/teardown, and CI/CD integration to drastically improve test reliability, maintenance, and speed.