Skip to content

public/uploads/rules/playwright with-ai/rule (PR from TinaCMS)#12659

Open
tina-cloud-app[bot] wants to merge 20 commits intomainfrom
tina/public/uploads/rules/playwright-with-ai/rule
Open

public/uploads/rules/playwright with-ai/rule (PR from TinaCMS)#12659
tina-cloud-app[bot] wants to merge 20 commits intomainfrom
tina/public/uploads/rules/playwright-with-ai/rule

Conversation

@tina-cloud-app
Copy link
Copy Markdown
Contributor

@tina-cloud-app tina-cloud-app Bot commented May 5, 2026

Summary of Changes

  • Introducing a new rule regarding Playwright, and how to use it with your AI Agents, and recommended best practices

Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🔍 Preview PR Changes

View updated pages in edit mode:

Branch: tina/public/uploads/rules/playwright-with-ai/rule

@github-actions github-actions Bot added the Age: 🥚 - New About 2 hours old label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Hi @tina-cloud-app[bot],

Rule: ../../public/uploads/rules/playwright-with-ai/rule.mdx

Issues Detected:

  • must have required property 'seoDescription'
  • must have required property 'authors'

Please fix the Frontmatter in your Markdown files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

👋 Hi @suiyangqiu,

This PR is currently in Draft mode. To help it get reviewed and merged:

  1. ✍️ Update PR title & add a description - Explain what changes you've made and why
  2. Mark as ready for review - Click "Ready for review" when you're done
  3. 👥 Add reviewers - Assign people to review your changes
  4. 📣 Notify reviewers - Message or call them to let them know the PR is ready

Once you've completed these steps, your PR will be ready for approval!

This is an automated reminder to help reduce draft PRs without descriptions or reviewers.

suiyangqiu and others added 4 commits May 5, 2026 15:32
Add full rule content covering the four ways to combine Playwright
with AI coding agents: the Playwright MCP server, the CLI plus
codegen, and the official Test Agents (Planner, Generator, Healer).
Includes good/bad examples, install snippets for Claude Code, VS
Code, Cursor, and best-practice guidance on locator strategy and
the record-then-refine workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
@github-actions github-actions Bot added Age: 🐥 - Adolescent About 8 hours old Age: 🐤 - Mature About 16 hours old Age: 🐓 - Old About 32 hours old and removed Age: 🥚 - New About 2 hours old Age: 🐥 - Adolescent About 8 hours old Age: 🐤 - Mature About 16 hours old labels May 5, 2026
tina-cloud-app Bot and others added 7 commits May 6, 2026 01:28
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
Add a new "Using Playwright for AI-driven development" section
covering the inner-loop dev workflow (verify changes, reproduce
bugs, explore before editing, deep-link iteration, component
playground checks, network mocking) - the under-served angle where
the agent uses Playwright to close its own "is it done?" loop
rather than for testing.

Replace the best-practices bullets with a tighter mix of agent
behaviour and setup safety: POM, run-before-declare-success,
role-based locators, scoped origins with --isolated, and one-test-
at-a-time iteration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Qiu <MichaelQiu@ssw.com.au>
@suiyangqiu suiyangqiu marked this pull request as ready for review May 6, 2026 05:29
@github-actions github-actions Bot added the Age: 🥚 - New About 2 hours old label May 6, 2026

Without access to a browser, agents have to guess and assume what the UI looks like. This means that it writes selectors blindly, and can't see the results of its own changes. In turn, it can ship tests that break the moment they're run and build features that look completely wrong without a second thought.

By giving the agent Playwright, we can close this loop and set up a sort of iterative inner loop for the agent to check its own changes, allowing for:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By giving the agent Playwright, we can close this loop and set up a sort of iterative inner loop for the agent to check its own changes, allowing for:
By giving the agent access to Playwright, we can close this loop and set up an iterative inner loop for the agent to check its own changes, allowing for:

Comment thread public/uploads/rules/playwright-with-ai/rule.mdx

For most day-to-day test authoring, building, and usage, the Playwright CLI driven by your AI Agent is faster and cheaper than using the MCP to drive. In many cases, using the CLI with a coding agent uses approximately **4x fewer tokens** compared to a run with the same prompt to an agent using the MCP.

### Using Playwright CLI with Codegen (Optional)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a link to it? or is it part of the cli installation as optional? Would be good to clarify this in the first line

@github-actions github-actions Bot removed the Age: 🥚 - New About 2 hours old label May 6, 2026
suiyangqiu and others added 3 commits May 6, 2026 17:07
Co-authored-by: Lewis Toh [SSW] <88498002+Lewkans@users.noreply.github.com>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
0xharkirat and others added 5 commits May 6, 2026 17:42
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Co-authored-by: Hark Singh [SSW] <harksingh@ssw.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Age: 🐓 - Old About 32 hours old

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants