playwright-pom-discovery

Discover stable selectors for Opik E2E Page Object Models using Playwright.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jimmy071919/iiii-project --skill playwright-pom-discovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-pom-discovery
Source: https://github.com/jimmy071919/iiii-project/tree/main/opik/.agents/skills/playwright-pom-discovery
Command: npx skills add https://github.com/jimmy071919/iiii-project --skill playwright-pom-discovery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the discovery of stable selectors for Page Object Models (POMs) in the Opik E2E suite, streamlining the process of selecting reliable locators for testing.

Core Features & Use Cases

  • POM Discovery: Walks through the process of identifying stable selectors against the live UI.
  • State Seeding: Seeds required state, such as projects and datasets, for testing.
  • Accessibility Snapshot: Generates an accessibility snapshot for detailed element inspection.
  • Data-testid Enumeration: Enumerates data-testids for stable selectors.
  • Selector Preference: Prioritizes testids, roles, labels, and CSS for selectors.
  • Use Case: When building a POM for a new page in the Opik E2E suite, use this Skill to ensure stable selectors for the page's elements before committing changes.

Quick Start

Use the playwright-pom-discovery skill to discover selectors for the "LogsPage" by navigating to the corresponding project's logs and running the discovery procedure.

Frequently Asked Questions about playwright-pom-discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find stable selectors for Playwright E2E tests?

To find stable selectors for Playwright E2E tests, automate POM discovery by generating accessibility snapshots against the live UI, enumerating data-testids, and prioritizing locators like roles and labels for stable page object models.

How does accessibility snapshot generation work for POM discovery?

Accessibility snapshot generation for POM discovery works by inspecting the live UI state to capture detailed element structures, allowing you to enumerate data-testids and prioritize stable selectors like roles, labels, and CSS for your E2E tests.

How do I seed required state for Playwright E2E testing?

You seed required state for Playwright E2E testing by initializing necessary projects and datasets before running the POM discovery procedure, ensuring the live UI has the required preconditions to accurately generate accessibility snapshots and enumerate selectors.

What is the selector preference order for stable Playwright locators?

The selector preference order for stable Playwright locators prioritizes data-testids first, followed by roles, labels, and finally CSS, ensuring that page object models rely on the most resilient element identifiers against UI changes.

Can I use playwright-pom-discovery for E2E testing outside the Opik suite?

The playwright-pom-discovery skill is specifically intended for E2E test development within the Opik ecosystem, handling state seeding and selector discovery tailored to the Opik suite rather than general E2E testing contexts.

Why are my Playwright E2E test selectors breaking during UI changes?

Playwright E2E test selectors break during UI changes when relying on unstable CSS locators instead of resilient identifiers, which is why you should automate POM discovery to prioritize data-testids, roles, and labels for selector stability.