Playwright Selectors & Strategies

•
6
•

Provides a comprehensive set of selector strategies and best practices for creating resilient Playwright end-to-end tests.

This skill equips Claude with the expertise to select DOM elements effectively using Playwright's modern testing library. It emphasizes resilient selection methods like ARIA roles and test IDs over brittle CSS paths, ensuring tests remain stable even as UI styling changes. By providing patterns for complex scenarios like Shadow DOM piercing, iframe handling, and layout-based positioning, it enables the generation of high-quality, maintainable automation scripts for frontend and full-stack development tasks.

主な機能

016 GitHub stars
02Built-in strategies for Shadow DOM piercing and iframe interactions
03Role-based selection for improved accessibility and test resilience
04Advanced CSS and XPath selector patterns for complex DOM traversal
05Smart waiting strategies and filtering techniques for dynamic elements
06Layout-based selectors for relative positioning (e.g., :above, :left-of)

ユースケース

01Generating robust E2E test suites for modern web applications
02Refactoring brittle legacy test selectors to modern Playwright best practices
03Automating interactions with complex UI components like nested tables, modals, and frames