playwright-pom-discovery
Skill by comet-ml
Guides choosing stable selectors for Page Object Model classes in the Opik E2E suite. It is for developers building or extending POMs against the live Opik UI.
Install playwright-pom-discovery
Built from the published package, never by AI.
git clone --depth 1 https://github.com/comet-ml/opik /tmp/opik && mkdir -p ~/.claude/skills && cp -r /tmp/opik/.agents/skills/playwright-pom-discovery ~/.claude/skills/playwright-pom-discoveryRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install playwright-pom-discovery in Claude Code
git clone --depth 1 https://github.com/comet-ml/opik /tmp/opik && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/opik/.agents/skills/playwright-pom-discovery ~/.gemini/antigravity-cli/skills/playwright-pom-discoveryAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install playwright-pom-discovery in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to find stable selectors for a Page Object Model in the Opik end-to-end test suite under tests_end_to_end/e2e/pom/. It walks through identifying the target page and its required data, seeding that state through the SDK or bridge instead of the UI, and opening the page in a browser session.
The agent then reads an accessibility snapshot and enumerates data-testid attributes on the rendered page. It prefers test ids, then roles, labels and CSS, and verifies each locator before committing the method. The source says it is the discovery sub-step used by the writing-e2e-tests skill. It is aimed at contributors who write Playwright tests for Opik.
Written from the project's SKILL.md and checked against it.
What it can do
- Seed required stateCreates the projects, traces, datasets or other entities a page needs before the UI is explored.
- browser_navigateOpens the target Opik page in the Playwright MCP browser session.
- browser_snapshotReads the accessibility tree of the page to find roles and accessible names.
- browser_evaluateLists the data-testid attributes currently rendered on the page.
- Selector preferenceChooses locators in the order test id, role, label, then CSS.
- browser_generate_locatorVerifies a candidate locator before the POM method is committed.
- test_runRuns the POM method as part of verification before committing.
- browser_handle_dialogAuto-accepts beforeunload or confirm dialogs so navigation does not hang.
What you need
- Playwright MCP servers opik-playwright and opik-playwright-test configured in .mcp.json
- A running Opik UI, such as http://localhost:5173 for local OSS or an authenticated deployment
- Opik API key, workspace name and base URL for seeding state
- Node.js for the TypeScript seed scripts
Try asking
- Help me choose stable selectors for a new LogsPage object in the Opik E2E suite
- Walk me through discovering the DatasetItemsPage selectors before I write the POM
- Which data-testid attributes are on the test suites page right now?
Good to know
- Applies to work under tests_end_to_end/e2e/pom/ in the Opik repository.
- Does not apply to pure fixture work or matcher and type-only changes.
- Depends on a running Opik UI and the Playwright MCP servers.
- Described as the discovery sub-step used by the writing-e2e-tests skill.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/playwright-pom-discovery/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md17 KB
Alternatives to playwright-pom-discovery
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
playwright-pom-discovery: common questions
When should I use the playwright-pom-discovery skill?
The source says to use it when building or extending a Page Object Model for the Opik E2E suite and stable selectors against the live UI are needed.
Why does the skill say to seed state through the SDK instead of the UI?
The source says UI-create is slower and flakier than SDK-create, and the page being explored may itself be the UI-create flow under test.
Which selector is preferred?
The source says data-testid selectors are preferred because they are the frontend team's contract for stability, followed by role, label and CSS.
How do I install playwright-pom-discovery?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is playwright-pom-discovery free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is playwright-pom-discovery safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to playwright-pom-discovery?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
