Workflow·Browser Automation·v1.0

Playwright Skill

Generates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java or C#, running locally or…

You say
Buy it · $89 Read it before you buy $89 Written by LambdaTest · unverified publisher
Context cost
21.1k tokensestimated from the bundle, loaded when it triggers
Bundle
14 files · 84.3 kB4 scripts among them — read before you run
Licence
MITpaid listing
Last change
v1.0
Servers it uses
Noneruns standalone

What it does

Generates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java, or C#. Supports local execution and TestMu AI cloud across 3000+ browser/OS combinations and real mobile devices. Use when the user asks to write Playwright tests, automate browsers, run cross-browser tests, test on real devices, debug flaky tests, mock APIs, or do visual regression. Triggers on: "Playwright", "E2E test", "browser test", "run on cloud", "cross-browser", "TestMu", "LambdaTest", "test my app", "test on mobile", "real device".

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Workflow

Runs a procedure end to end.

playwrighte2ecross-browsertesting

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md11.8 kB · 341 lines
--- name: playwright-skill description: > Generates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java, or C#. Supports local execution and TestMu AI cloud across 3000+ browser/OS combinations and real mobile devices. Use when the user asks to write Playwright tests, automate browsers, run cross-browser tests, test on real devices, debug flaky tests, mock APIs, or do visual regression. Triggers on: "Playwright", "E2E test", "browser test", "run on cloud", "cross-browser", "TestMu", "LambdaTest", "test my app", "test on mobile", "real device". languages: - JavaScript - TypeScript - Python - Java - C# category: e2e-testing license: MIT metadata: author: TestMu AI version: "1.0" ---
25# Playwright Test Automation
26
27## Step 1 — Determine Execution Target
28
29Decide BEFORE writing any code:
30
31| User says... | Target | Action |
32|---|---|---|
33| No cloud mention, "locally", "debug" | **Local** | Standard Playwright config |
34| "cloud", "TestMu", "LambdaTest", "cross-browser", "real device" | **Cloud** | See [reference/cloud-integration.md](reference/cloud-integration.md) |
35| Impossible local combo (Safari on Windows, Edge on Linux) | **Cloud** | Suggest TestMu AI, see [reference/cloud-integration.md](reference/cloud-integration.md) |
36| "HyperExecute", "parallel at scale" | **HyperExecute** | Defer to hyperexecute-skill |
37| "visual regression", "screenshot comparison" | **SmartUI** | Defer to smartui-skill |
38| Ambiguous | **Local** | Default local, mention cloud option |
39
40## Step 2 — Detect Language
41
42| Signal | Language | Default |
43|---|---|---|
44| "TypeScript", "TS", .ts, or no language specified | TypeScript | ✅ |
45| "JavaScript", "JS", .js | JavaScript | |
46| "Python", "pytest", .py | Python | See [reference/python-patterns.md](reference/python-patterns.md) |
47| "Java", "Maven", "Gradle", "TestNG" | Java | See [reference/java-patterns.md](reference/java-patterns.md) |
48| "C#", ".NET", "NUnit", "MSTest" | C# | See [reference/csharp-patterns.md](reference/csharp-patterns.md) |
49
50## Step 3 — Determine Scope
51
52| Request type | Output |
53|---|---|
54| One-off quick script | Standalone .ts file, no POM |
55| Single test for existing project | Match their structure and conventions |
56| New test suite / project | Full scaffold — see [scripts/scaffold-project.sh](scripts/scaffold-project.sh) |
57| Fix flaky test | Debugging checklist — see [reference/debugging-flaky.md](reference/debugging-flaky.md) |
58| API mocking needed | See [reference/api-mocking-visual.md](reference/api-mocking-visual.md) |
59| Mobile device testing | See [reference/mobile-testing.md](reference/mobile-testing.md) |
60
61---
62
63## Core Patterns — TypeScript (Default)
64
65### Selector Priority
66
67Use in this order — stop at the first that works:
68
691. getByRole('button', { name: 'Submit' }) — accessible, resilient
702. getByLabel('Email') — form fields
713. getByPlaceholder('Enter email') — when label missing
724. getByText('Welcome') — visible text
735. getByTestId('submit-btn') — last resort, needs data-testid
74
75Never use raw CSS/XPath unless matching a third-party widget with no other option.
76
77### Assertions — Always Web-First
78
79```typescript
80// ✅ Auto-retries until timeout
81await expect(page.getByRole('heading')).toBeVisible();
82await expect(page.getByRole('alert')).toHaveText('Saved');
83await expect(page).toHaveURL('/dashboard');
84
85// ❌ No auto-retry — races with DOM
86const text = await page.textContent('.msg');
87expect(text).toBe('Saved');
88```
89
90### Anti-Patterns
91
92| ❌ Don't | ✅ Do | Why |
93|----------|-------|-----|
94| page.waitForTimeout(3000) | await expect(locator).toBeVisible() | Hard waits are flaky |
95| expect(await el.isVisible()) | await expect(el).toBeVisible() | No auto-retry |
96| page.$('.btn') | page.getByRole('button') | Fragile selector |
97| page.click('.submit') | page.getByRole('button', {name:'Submit'}).click() | Not accessible |
98| Shared state between tests | test.beforeEach for setup | Tests must be independent |
99| try/catch around assertions | Let Playwright handle retries | Swallows real failures |
100
101### Page Object Model
102
103Use POM for any project with more than 3 tests. Full patterns with base page, fixtures, and examples in [reference/page-object-model.md](reference/page-object-model.md).
104
105Quick example:
106
107```typescript
108// pages/login.page.ts
109import { Page, Locator } from '@playwright/test';
110
111export class LoginPage {
112 readonly emailInput: Locator;
113 readonly passwordInput: Locator;
114 readonly submitButton: Locator;
115
116 constructor(private page: Page) {
117 this.emailInput = page.getByLabel('Email');
118 this.passwordInput = page.getByLabel('Password');
119 this.submitButton = page.getByRole('button', { name: 'Sign in' });
120 }
121
122 async login(email: string, password: string) {
123 await this.emailInput.fill(email);
124 await this.passwordInput.fill(password);
125 await this.submitButton.click();
126 }
127}
128```
129
130### Configuration — Local
131
132```typescript
133// playwright.config.ts
134import { defineConfig, devices } from '@playwright/test';
135
136export default defineConfig({
137 testDir: './tests',
138 timeout: 30_000,
139 retries: process.env.CI ? 2 : 0,
140 workers: process.env.CI ? 1 : undefined,
141 reporter: [['html'], ['list']],
142 use: {
143 baseURL: 'http://localhost:3000',
144 trace: 'on-first-retry',
145 screenshot: 'only-on-failure',
146 },
147 projects: [
148 { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
149 { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
150 { name: 'webkit', use: { ...devices['Desktop Safari'] } },
151 { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
152 { name: 'mobile-safari', use: { ...devices['iPhone 13'] } },
153 ],
154 webServer: {
155 command: 'npm run dev',
156 port: 3000,
157 reuseExistingServer: !process.env.CI,
158 },
159});
160```
161
162### Cloud Execution on TestMu AI
163
164Set environment variables: LT_USERNAME, LT_ACCESS_KEY
165
166**Direct CDP connection** (standard approach):
167
168```typescript
169// lambdatest-setup.ts
170import { chromium } from 'playwright';
171
172const capabilities = {
173 browserName: 'Chrome',
174 browserVersion: 'latest',
175 'LT:Options': {
176 platform: 'Windows 11',
177 build: 'Playwright Build',
178 name: 'Playwright Test',
179 user: process.env.LT_USERNAME,
180 accessKey: process.env.LT_ACCESS_KEY,
181 network: true,
182 video: true,
183 console: true,
184 },
185};
186
187const browser = await chromium.connect({
188 wsEndpoint: wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))},
189});
190const context = await browser.newContext();
191const page = await context.newPage();
192```
193
194**HyperExecute project approach** (for parallel cloud runs):
195
196```typescript
197// Add to projects array in playwright.config.ts:
198{
199 name: 'chrome:latest:Windows 11@lambdatest',
200 use: { viewport: { width: 1920, height: 1080 } },
201},
202{
203 name: 'MicrosoftEdge:latest:macOS Sonoma@lambdatest',
204 use: { viewport: { width: 1920, height: 1080 } },
205},
206```
207
208Run: npx playwright test --project="chrome:latest:Windows 11@lambdatest"
209
210### Test Status Reporting (Cloud)
211
212Tests on TestMu AI show "Completed" by default. You MUST report pass/fail:
213
214```typescript
215// In afterEach or test teardown:
216await page.evaluate((_) => {},
217 `lambdatest_action: ${JSON.stringify({
218 action: 'setTestStatus',
219 arguments: { status: testInfo.status, remark: testInfo.error?.message || 'OK' },
220 })}`
221);
222```
223
224This is handled automatically when using the fixture from [reference/cloud-integration.md](reference/cloud-integration.md).
225
226---
227
228## Validation Workflow
229
230After generating any test:
231
232```
2331. Validate config: python scripts/validate-config.py playwright.config.ts
2342. If errors → fix → re-validate
2353. Run locally: npx playwright test --project=chromium
2364. If cloud: npx playwright test --project="chrome:latest:Windows 11@lambdatest"
2375. If failures → check reference/debugging-flaky.md
238```
239
240---
241
242## Quick Reference
243
244### Common Commands
245
246```bash
247npx playwright test # Run all tests
248npx playwright test --ui # Interactive UI mode
249npx playwright test --debug # Step-through debugger
250npx playwright test --project=chromium # Single browser
251npx playwright test tests/login.spec.ts # Single file
252npx playwright show-report # Open HTML report
253npx playwright codegen https://example.com # Record test
254npx playwright test --update-snapshots # Update visual baselines
255```
256
257### Auth State Reuse
258
259```typescript
260// Save auth state once in global setup
261await page.context().storageState({ path: 'auth.json' });
262
263// Reuse in config
264use: { storageState: 'auth.json' }
265```
266
267### Visual Regression (Built-in)
268
269```typescript
270await expect(page).toHaveScreenshot('homepage.png', {
271 maxDiffPixelRatio: 0.01,
272 animations: 'disabled',
273 mask: [page.locator('.dynamic-date')],
274});
275```
276
277### Network Mocking
278
279```typescript
280await page.route('**/api/users', (route) =>
281 route.fulfill({ json: [{ id: 1, name: 'Mock User' }] })
282);
283```
284
285Full mocking patterns in [reference/api-mocking-visual.md](reference/api-mocking-visual.md).
286
287### Test Steps for Readability
288
289```typescript
290test('checkout flow', async ({ page }) => {
291 await test.step('Add item to cart', async () => {
292 await page.goto('/products');
293 await page.getByRole('button', { name: 'Add to cart' }).click();
294 });
295
296 await test.step('Complete checkout', async () => {
297 await page.getByRole('link', { name: 'Cart' }).click();
298 await page.getByRole('button', { name: 'Checkout' }).click();
299 });
300});
301```
302
303---
304
305## Reference Files
306
307| File | When to read |
308|------|-------------|
309| [reference/cloud-integration.md](reference/cloud-integration.md) | Cloud execution, 3 integration patterns, parallel browsers |
310| [reference/page-object-model.md](reference/page-object-model.md) | POM architecture, base page, fixtures, full examples |
311| [reference/mobile-testing.md](reference/mobile-testing.md) | Android + iOS real device testing |
312| [reference/debugging-flaky.md](reference/debugging-flaky.md) | Flaky test checklist, common fixes |
313| [reference/api-mocking-visual.md](reference/api-mocking-visual.md) | API mocking + visual regression patterns |
314| [reference/python-patterns.md](reference/python-patterns.md) | Python-specific: pytest-playwright, sync/async |
315| [reference/java-patterns.md](reference/java-patterns.md) | Java-specific: Maven, JUnit, Gradle |
316| [reference/csharp-patterns.md](reference/csharp-patterns.md) | C#-specific: NUnit, MSTest, .NET config |
317| [../shared/testmu-cloud-reference.md](../shared/testmu-cloud-reference.md) | Full device catalog, capabilities, geo-location |
318
319## Advanced Playbook
320
321For production-grade patterns, see reference/playbook.md:
322
323| Section | What's Inside |
324|---------|--------------|
325| §1 Production Config | Multi-project, reporters, retries, webServer |
326| §2 Auth Fixture Reuse | storageState, multi-role fixtures |
327| §3 Page Object Model | BasePage, LoginPage with fluent API |
328| §4 Network Interception | Mock, modify, HAR replay, block resources |
329| §5 Visual Regression | Screenshot comparison, masks, thresholds |
330| §6 File Upload/Download | fileChooser, setInputFiles, download events |
331| §7 Multi-Tab & Dialogs | Popup handling, alert/confirm/prompt |
332| §8 Geolocation & Emulation | Location, timezone, locale, color scheme |
333| §9 Custom Fixtures | DB seeding, API context, auto-teardown |
334| §10 API Testing | Request context, end-to-end API+UI |
335| §11 Accessibility | axe-core integration, WCAG audits |
336| §12 Sharding | CI matrix sharding, report merging |
337| §13 CI/CD | GitHub Actions with artifacts |
338| §14 Debugging Toolkit | Debug, UI mode, trace viewer, codegen |
339| §15 Debugging Table | 10 common problems with fixes |
340| §16 Best Practices | 17-item production checklist |
341
In the file
SKILL.md1,416 words
Files14
LicenceMIT
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈190
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
20,885
on trigger
The instruction body and 13 supporting files, read only when the skill fires.
10.5%
of a 200k window
Ten skills this size would take about 105% of the window before you open a file.
050k100k150k200k context window

21.1k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

14 files, 84.3 kB on disk. Mostly text — the instructions the model reads — with 4 scripts in it that your client would run only if the instructions tell it to.

  • SKILL.md11.8 kB
  • reference/api-mocking-visual.md3.4 kB
  • reference/cloud-integration.md8.4 kB
  • reference/csharp-patterns.md4.7 kB
  • reference/debugging-flaky.md4.3 kB
  • reference/java-patterns.md5.1 kB
  • reference/mobile-testing.md4.4 kB
  • reference/page-object-model.md5.1 kB
  • reference/playbook.md16.9 kB
  • reference/python-patterns.md5.4 kB
  • scripts/scaffold-project.sh6.4 kB
  • scripts/validate-config.py3.3 kB
  • templates/lambdatest-setup.ts2.8 kB
  • templates/playwright.config.ts2.3 kB
What is not in it

A skill installs nothing and depends on nothing: it is a folder your client reads. This one carries 4 scripts beside the text, so the bundle is 14 files you can review in full before installing. The MIT licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

$89 once
Playwright Skill · MIT · LambdaTest
one-time
Price$89 once
LicenceMIT — the author’s, unchanged by this purchase
Paid throughStripe, once, on the card you add at the checkout
Keeps workingfor good — the files are yours once they are on disk
Updatesevery release of 1.x through this account

You can read the whole bundle before paying — the SKILL.md above is the product, not a preview of it. What the money buys is the delivery: the folder packaged and handed to your machine by key, every update its author ships, and our support if it does not do what this listing says. The terms of use are MIT, set by the author and unchanged by buying it here.

Payment runs through Stripe, on a page like this one rather than a redirect. Once there is an account it joins the same mcprush invoice as everything else you run, so there is never a second card to enter.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Version1.0
Publishedno release date on file
Price$89
Referencelambdatest/playwright-skill

Versions

v1.0 is what is on the shelf; no release here carries a date. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v1.0
  • No earlier releases have been published to the marketplace.
Pinning

Put lambdatest/playwright-skill@1.0 in the install command to hold this exact version. Without the suffix you get whatever is current the day you install, and nothing moves under you afterwards.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Publisher
Servers0