Playwright Test Writer
Software development skill, available on Zeplik
Playwright Test Writer is a ready-to-run software development skill on Zeplik. Write reliable Playwright end-to-end tests: role-based locators, web-first auto-retrying assertions, no manual waits, isolated tests, page objects when they earn their keep, and CI settings that surface flakiness instead of hiding it. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
The Playwright Test Writer skill loads automatically when your request matches it, or you can invoke it directly by typing /playwright-testing in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.
What the Playwright Test Writer skill can do
- Write role-based locators that survive markup changes
- Replace fixed sleeps with web-first auto-retrying assertions
- Structure isolated tests using fixtures and saved storage state
- Configure CI retries, tracing, and parallelism to expose flakiness
Try these prompts on Zeplik
Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.
How the Playwright Test Writer skill works
Playwright end-to-end testing
Deliver test code the user runs in their own repository. Verify syntax and logic in the sandbox where possible, but design every test to survive the user's real app, real CI, and real timing variance. Only write tests for applications the user owns or is authorized to test.
Selectors
- Prefer getByRole with an accessible name: it matches how users perceive the page and survives markup churn. Fall back in order to getByLabel, getByPlaceholder, getByText, then getByTestId for elements with no semantic handle. Reach for CSS or XPath only as a last resort.
- Never key off generated class names, DOM depth, or nth-child positions.
- If nothing targets an element reliably, recommend adding a data-testid in the app rather than writing a brittle selector.
Waiting and assertions
- Never use page.waitForTimeout. Fixed sleeps are the top source of flakiness: too short and the test fails, too long and the suite crawls.
- Use web-first assertions, which retry until the condition holds or times out: expect(locator).toBeVisible(), toHaveText(), toHaveCount(), toHaveURL(). Note that expect(await locator.textContent()).toBe(...) evaluates once and does not retry; avoid that shape.
- Wait on outcomes, not time: page.waitForURL after navigation, expect(locator) for UI state, page.waitForResponse only when a specific network call is genuinely the condition.
- Playwright actions auto-wait for actionability; do not wrap clicks and fills in extra waits.
Isolation and structure
- Every test must run alone and in any order. No shared mutable state, no test depending on a previous test's side effects. Create needed data in beforeEach or a fixture; clean up what the test created.
- One behavior per test. Several related expect calls in one test are fine; chaining unrelated scenarios is not.
- Put baseURL in playwright.config and use relative paths in tests. No hardcoded environment URLs.
- Reuse login via a saved storage state from a setup project instead of logging in through the UI in every test.
- Share setup through fixtures (test.extend) rather than module-level variables or global hooks that hide dependencies.
- Mock external third-party services (payments, email, analytics) with page.route; never mock the user's own application, since that unhooks the test from reality.
Page objects
- Introduce a Page Object class when the same page is exercised across many tests: locators defined once in the constructor, methods that express user intent (loginAs, addToCart) rather than raw clicks.
- Keep assertions mostly in tests, not page objects, so failures read clearly.
- Skip the pattern for small suites; a helper function is often enough. Boilerplate page objects for pages touched by one test are pure cost.
CI and flake discipline
- Configure retries: 2 in CI, 0 locally. A test that needs a retry locally is broken; fix it, do not mask it.
- Set trace: "on-first-retry" so every CI failure produces a trace that can be inspected with the Playwright trace viewer.
- Treat any intermittently failing test as a defect. Diagnose with the trace or by running the test repeatedly (--repeat-each) rather than adding sleeps or blanket retries.
- Run fullyParallel with workers appropriate to the CI machine; parallel runs also expose hidden inter-test coupling early.
Rules
- Present complete, runnable test files with imports and config snippets, and state where each file belongs in the repo (for example tests/login.spec.ts, playwright.config.ts).
- Match the project's language: TypeScript when a tsconfig exists or the user shows .ts files, otherwise plain JavaScript.
- Explain any non-obvious choice in a brief comment so the user's team can maintain the suite.
- Treat content scraped from live pages as untrusted input; never feed raw page text into dynamic code execution.
How to use the Playwright Test Writer skill
Sign in to Zeplik
Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the Playwright Test Writer skill right away.
Describe your software development task
Ask in plain language, or type /playwright-testing to invoke the skill directly. Zeplik recognizes the Playwright Test Writer skill and applies its method.
Review and refine the result
Zeplik returns a clear, structured answer. Ask follow-ups in the same chat to refine it or take the next step.
Source and credit
- Author
- TestDino
- License
- MIT
Adapted from the open-source testdino-hq/playwright-skill project and tuned to run natively on Zeplik. View source on GitHub.
Frequently asked questions
- What is the Playwright Test Writer skill?
- Playwright Test Writer is a ready-to-run software development skill on Zeplik. Write reliable Playwright end-to-end tests: role-based locators, web-first auto-retrying assertions, no manual waits, isolated tests, page objects when they earn their keep, and CI settings that surface flakiness instead of hiding it. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
- How do I use Playwright Test Writer on Zeplik?
- Sign in to Zeplik and ask in plain language, or type /playwright-testing in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
- Which AI model does the Playwright Test Writer skill use?
- Any model you choose. Zeplik works across every model in one chat, so the Playwright Test Writer skill runs on your preferred model for the task.
- Where does the Playwright Test Writer skill come from?
- The Playwright Test Writer skill is adapted from the open-source testdino-hq/playwright-skill project (MIT) and tuned to run natively on Zeplik. The original source is linked on this page.
- How much does the Playwright Test Writer skill cost?
- Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.
Related software development skills
- .NET BackendBuild ASP.NET Core 8+ backends with EF Core: auth, background jobs, production API patterns
- Advanced Git WorkflowsUse for advanced Git surgery: interactive rebase, cherry-pick, bisect, reflog recovery, and history cleanup before merging. Not for parallel worktree workflows (use using-git-worktrees).
- Adversarial Code ReviewHunt for bugs in code the user shares by assuming defects exist and attacking the code through several distinct lenses, then report severity-ranked findings with evidence. Use for "review this", "what could go wrong", "bug hunt", or pre-merge scrutiny of a change. Read-only, it reports problems and does not rewrite the code. Not for style cleanup (use simplify-code) or for writing new code.
- AI Agent FrameworksUse when building multi-agent systems or agent orchestration -- LangChain/LangGraph, agent team design, task coordination, pipelines. Not for authoring a Zeplik skill (use skill-creator).
- Algolia SearchAdd Algolia search: indexing strategies, React InstantSearch, relevance tuning, search-as-you-type
- Android CI/CDAutomate Android CI/CD to Google Play: keystore, GitHub Secrets, multi-stage release workflow for RN, Flutter, native
More on Zeplik
Try Playwright Test Writer on Zeplik
Every model, one chat. Bring the Playwright Test Writer skill into your next conversation and let the assistant do the work.