SkillsReviewed · testdino-hq

Playwright Frontend

Playwright Frontend is a skill for frontend engineers and AI coding assistants that explains how to make page elements easy to find in tests, but teams must apply and maintain its conventions themselves. It prioritizes accessible HTML, then covers stable data-testid attributes with React, Vue, Angular and Svelte examples.

Researched 16 Nov 2026

In short.

Playwright Frontend is a skill that helps frontend engineers and AI coding assistants make interfaces easier to automate, but it offers written guidance rather than automatic checks. It recommends accessible HTML first and stable data-testid values when role, label or text locators fall short. Its framework examples are useful starting points, although the login examples add IDs to already labelled controls, and the optional Next.js stripping configuration needs care in production-built staging or CI environments. No code was executed; compatibility and reductions in test failures are not established.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes all three files in the selected frontend folder at commit 27b3ed58126bf875cb8cf0a5a39561c7824b65fc: SKILL.md, data-testid-conventions.md and examples.md. It also includes the repository-level LICENSE above that folder. Other repository folders, linked core guides, external Playwright documentation and build-plugin documentation are excluded. No code was executed; assistant installation, framework compilation, browser behavior, stripping behavior and effects on test reliability were not assessed.

The overview

Identity

Playwright Frontend is the frontend skill folder in testdino-hq/playwright-skill. Its entry file declares the name playwright-frontend, author testdino.com and version 1.0.0. The folder contains SKILL.md, data-testid-conventions.md and examples.md.

It addresses the application side of browser automation: writing markup that tests and AI agents can locate predictably. The original project folder is [https://github.com/testdino-hq/playwright-skill/tree/main/frontend].

Assessment

The skill offers a concrete agreement between component authors and automation authors: expose meaningful roles and labels, then add deliberate test IDs where those are insufficient. Its strongest material concerns stable identifiers for repeated items, scoping actions within containers and avoiding IDs tied to styling or translated text.

The selected files provide conventions and illustrative snippets, without an automated checker. Their practical benefit depends on consistent adoption. Some examples also need reconciliation with the written rules, particularly selective use of test IDs and environment-specific attribute stripping.

Users

The intended users are frontend engineers writing or reviewing components, including AI coding assistants doing that work. Beginners get explanations of why labels, roles and stable record keys matter. Experienced developers get naming rules, framework binding syntax, shared helper patterns and build configuration examples.

Test authors can use it to agree on a markup contract with application developers, but it is not a complete guide to writing Playwright tests. The referenced core guides address that complementary role and are outside this folder.

Capabilities

The guidance covers choosing between semantic locators and test IDs, feature-based kebab-case names, page-wide uniqueness, stable identifiers in lists, container scoping and collection matching. It explains why array indices, random values, timestamps, styling and translated strings make poor identifier inputs.

Examples cover React/JSX, Vue 3, Angular 17+ control flow and Svelte 5. Additional patterns centralize identifiers in TypeScript helpers and optionally remove attributes during builds. These are documented patterns; the skill does not itself inspect pages, modify components or run tests.

Using it

Requirements

Applying the examples requires access to the frontend components and familiarity with the relevant framework. List patterns require stable entity keys, such as a user ID or product SKU. Using the demonstrated locators requires a Playwright setup whose testIdAttribute matches the application's attribute; the documented default is data-testid.

The files do not specify supported assistant hosts, host installation requirements or minimum Playwright versions. The framework labels identify example syntax, not demonstrated compatibility. No model, API key, GPU or paid service requirement is stated.

Mechanism

A locator is how automation identifies a page element. This skill first asks component authors to expose semantic elements, accessible names and form labels so role-based and label-based locators work. Where those handles are unsuitable, a data-testid attribute supplies a deliberate identifier that Playwright can read through getByTestId().

The identifier becomes an interface shared by the application and its automation. Names describe purpose, list values include stable domain keys, and shared constants or helpers reduce inconsistent strings. Renaming an identifier used by tests or agents is therefore treated as a breaking change.

Setup

Start with frontend/SKILL.md and keep its two companion files available because the entry file links to them. Host-specific skill installation commands are not documented. For application adoption, agree on one attribute name, make semantic markup usable first and add stable IDs only where automation needs them.

The examples show a shared testIds.ts module and a Playwright configuration using testIdAttribute: 'data-testid'. Build-time stripping is optional. If adopted, it must preserve the attributes in every environment where tests or agents need them; deployment-specific conditions require particular attention.

Example

The documented table pattern gives each user row an identifier derived from user.id. For user 42, the intended row identifier is user-row-42. A scoped action is page.getByTestId('user-row-42').getByRole('button', { name: 'Delete' }).click(). This combines a stable row identifier with the button's user-facing role and name.

For collection assertions, the guide suggests locating rows inside a users-table container or using an anchored pattern that matches row IDs without also matching child IDs. Its numeric regular-expression example needs adaptation if the application's keys are not numeric. These examples were not executed.

Assessment & evidence

Limitations

The rules discourage test IDs on controls already uniquely locatable by role or label, yet the login examples add IDs to labelled inputs and a named submit button. Readers should apply the selective-use rule rather than treating every illustrated attribute as necessary.

The Next.js stripping example enables reactRemoveProperties whenever NODE_ENV is production. If staging or CI uses that value, the condition also enables stripping there, conflicting with the requirement to retain automation handles. The deployment condition needs project-specific review.

Stable entity keys do not by themselves guarantee page-wide uniqueness when the same entity appears in multiple component instances. No execution results, compatibility matrix, accessibility audit or measured reduction in flaky tests are provided.

Reasoning

The central tradeoff is between checking what users perceive and keeping an automation handle stable. Role and label locators depend on meaningful interface semantics. Test IDs can remain unchanged through text, layout or role changes, making them useful anchors where those changes are expected.

That stability can also allow an ID-based action to keep working after a user-facing property changes. Tests concerned with labels, roles or accessibility therefore need assertions or locators that cover those properties. Container IDs combined with semantic child locators offer a practical compromise shown in the guide.

Alternatives

For an element with a unique, stable role and accessible name, the skill itself prefers getByRole(); labelled form controls can use getByLabel(). Those approaches may remove the need for an additional test ID. Container scoping is another option when repeated child controls have identical names.

The skill links to Playwright's locator documentation [https://playwright.dev/docs/locators] and best practices [https://playwright.dev/docs/best-practices], plus the repository's core locator guides for test authors. Those linked documents are outside the supplied content, so their contents and comparative coverage are not assessed.

Evidence

The source consists of the complete frontend folder: SKILL.md defines the skill, data-testid-conventions.md explains the rules and examples.md supplies framework and build snippets. The repository-level LICENSE supplies the accompanying rights notice.

The pinned entry file is [https://raw.githubusercontent.com/testdino-hq/playwright-skill/27b3ed58126bf875cb8cf0a5a39561c7824b65fc/frontend/SKILL.md]. Findings concern the written material and visible configuration logic. No code was executed, and claims of locator resilience are guidance rather than measured results.

Access & freshness

Costs

The MIT licence grants permission free of charge. The skill files do not specify subscription prices or usage charges. Costs for an assistant, browser-test infrastructure, implementation work and maintaining the identifier contract depend on the chosen setup and are unknown.

Rights

The repository LICENSE identifies TestDino as the 2026 copyright holder and grants MIT permission to use, copy, modify, publish, distribute, sublicense and sell the software and associated documentation. Copies or substantial portions must retain the copyright and permission notice. The licence provides no warranty and disclaims liability.

The skill metadata also declares MIT. The original licence text is available at [https://raw.githubusercontent.com/testdino-hq/playwright-skill/27b3ed58126bf875cb8cf0a5a39561c7824b65fc/LICENSE].

Freshness

The source snapshot was captured on 16 November 2026 at 03:20:49.799 UTC from commit 27b3ed58126bf875cb8cf0a5a39561c7824b65fc. SKILL.md declares version 1.0.0. The evidence does not establish a release date, whether this is the latest upstream revision or compatibility with subsequent framework and tooling releases.

Actions

Use the conventions to review a component or page: establish meaningful roles and labels, identify elements that still need stable handles and use domain keys for repeated records. Check uniqueness across the rendered page, including repeated instances of the same component. Share identifier helpers with the test suite where practical.

Review the examples against your framework and build configuration before adoption. If removing attributes, use conditions that preserve them wherever automation runs, including production-built staging environments. Confirm behavior in the intended environment before relying on the patterns; compatibility and operational benefits remain unassessed here.

Evidence for this report

LICENSEnotice · checked 2026-11-16
frontend/SKILL.mdselected · checked 2026-11-16
frontend/data-testid-conventions.mdselected · checked 2026-11-16
frontend/examples.mdselected · checked 2026-11-16