[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D97PTG3QSS3MYQXJTMJ0R2":3,"skill-same:01M7D97PTG3QSS3MYQXJTMJ0R2":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":14,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M7D97PTG3QSS3MYQXJTMJ0R2","Playwright Enhanced",null,"Advanced Playwright automation with auto-detection, custom fixtures, trace debugging, visual testing, mobile emulation, and production-grade test architecture.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fplaywright-skill-enhanced\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: Playwright Enhanced\ndescription: Advanced Playwright automation with auto-detection, custom fixtures, trace debugging, visual testing, mobile emulation, and production-grade test architecture.\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [playwright, e2e, advanced, fixtures, trace-viewer, visual-testing, mobile-testing]\ntestingTypes: [e2e, visual]\nframeworks: [playwright]\nlanguages: [typescript, javascript]\ndomains: [web, mobile]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# Playwright Enhanced Skill\n\nYou are an expert QA automation engineer specializing in advanced Playwright patterns. When asked to write or enhance Playwright tests, follow these production-grade instructions.\n\n## Advanced Configuration\n\n### Multi-Environment Setup\n\n```typescript\n\u002F\u002F playwright.config.ts\nimport { defineConfig, devices } from '@playwright\u002Ftest';\n\nconst env = process.env.TEST_ENV || 'local';\n\nconst environments = {\n  local: {\n    baseURL: 'http:\u002F\u002Flocalhost:3000',\n    apiURL: 'http:\u002F\u002Flocalhost:8080',\n  },\n  staging: {\n    baseURL: 'https:\u002F\u002Fstaging.example.com',\n    apiURL: 'https:\u002F\u002Fapi-staging.example.com',\n  },\n  production: {\n    baseURL: 'https:\u002F\u002Fexample.com',\n    apiURL: 'https:\u002F\u002Fapi.example.com',\n  },\n};\n\nexport default defineConfig({\n  testDir: '.\u002Ftests',\n  fullyParallel: true,\n  forbidOnly: !!process.env.CI,\n  retries: process.env.CI ? 2 : 0,\n  workers: process.env.CI ? 1 : undefined,\n\n  reporter: [\n    ['html', { open: 'never', outputFolder: 'test-results\u002Fhtml' }],\n    ['json', { outputFile: 'test-results\u002Fresults.json' }],\n    ['junit', { outputFile: 'test-results\u002Fjunit.xml' }],\n    process.env.CI ? ['github'] : ['list'],\n  ],\n\n  use: {\n    baseURL: environments[env].baseURL,\n    trace: 'retain-on-failure',\n    screenshot: 'only-on-failure',\n    video: 'retain-on-failure',\n    actionTimeout: 15000,\n    navigationTimeout: 30000,\n  },\n\n  projects: [\n    { name: 'setup', testMatch: \u002F.*\\.setup\\.ts\u002F },\n\n    {\n      name: 'chromium',\n      use: { ...devices['Desktop Chrome'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'firefox',\n      use: { ...devices['Desktop Firefox'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'webkit',\n      use: { ...devices['Desktop Safari'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'mobile-chrome',\n      use: { ...devices['Pixel 5'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'mobile-safari',\n      use: { ...devices['iPhone 13'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'tablet',\n      use: { ...devices['iPad Pro'] },\n      dependencies: ['setup'],\n    },\n  ],\n\n  webServer: env === 'local' ? {\n    command: 'npm run dev',\n    url: 'http:\u002F\u002Flocalhost:3000',\n    reuseExistingServer: !process.env.CI,\n    timeout: 120000,\n  } : undefined,\n});\n```\n\n## Advanced Custom Fixtures\n\n```typescript\n\u002F\u002F fixtures\u002Findex.ts\nimport { test as base, Page } from '@playwright\u002Ftest';\nimport { LoginPage } from '..\u002Fpages\u002Flogin.page';\nimport { DashboardPage } from '..\u002Fpages\u002Fdashboard.page';\n\ntype MyFixtures = {\n  loginPage: LoginPage;\n  dashboardPage: DashboardPage;\n  authenticatedPage: Page;\n  adminPage: Page;\n  mockApi: MockApiHelper;\n  testData: TestDataFactory;\n};\n\nexport const test = base.extend\u003CMyFixtures>({\n  loginPage: async ({ page }, use) => {\n    await use(new LoginPage(page));\n  },\n\n  dashboardPage: async ({ page }, use) => {\n    await use(new DashboardPage(page));\n  },\n\n  authenticatedPage: async ({ browser }, use) => {\n    const context = await browser.newContext({\n      storageState: 'playwright\u002F.auth\u002Fuser.json',\n    });\n    const page = await context.newPage();\n    await use(page);\n    await context.close();\n  },\n\n  adminPage: async ({ browser }, use) => {\n    const context = await browser.newContext({\n      storageState: 'playwright\u002F.auth\u002Fadmin.json',\n    });\n    const page = await context.newPage();\n    await use(page);\n    await context.close();\n  },\n\n  mockApi: async ({ page }, use) => {\n    const helper = new MockApiHelper(page);\n    await use(helper);\n  },\n\n  testData: async ({}, use) => {\n    const factory = new TestDataFactory();\n    await use(factory);\n    await factory.cleanup();\n  },\n});\n\nexport { expect } from '@playwright\u002Ftest';\n```\n\n### Advanced Page Object Pattern\n\n```typescript\n\u002F\u002F pages\u002Fbase.page.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\n\nexport abstract class BasePage {\n  protected page: Page;\n\n  constructor(page: Page) {\n    this.page = page;\n  }\n\n  async navigate(path: string): Promise\u003Cvoid> {\n    await this.page.goto(path);\n  }\n\n  async waitForPageLoad(): Promise\u003Cvoid> {\n    await this.page.waitForLoadState('networkidle');\n  }\n\n  async waitForElement(selector: string, timeout = 10000): Promise\u003CLocator> {\n    return this.page.waitForSelector(selector, { timeout });\n  }\n\n  async takeScreenshot(name: string): Promise\u003Cvoid> {\n    await this.page.screenshot({\n      path: `screenshots\u002F${name}.png`,\n      fullPage: true,\n    });\n  }\n\n  async scrollToElement(locator: Locator): Promise\u003Cvoid> {\n    await locator.scrollIntoViewIfNeeded();\n  }\n\n  async typeWithDelay(locator: Locator, text: string, delay = 100): Promise\u003Cvoid> {\n    await locator.type(text, { delay });\n  }\n\n  async selectDropdownOption(locator: Locator, option: string): Promise\u003Cvoid> {\n    await locator.click();\n    await this.page.getByRole('option', { name: option }).click();\n  }\n\n  async uploadFile(locator: Locator, filePath: string): Promise\u003Cvoid> {\n    await locator.setInputFiles(filePath);\n  }\n\n  async waitForApiResponse(urlPattern: string | RegExp): Promise\u003Cvoid> {\n    await this.page.waitForResponse((response) =>\n      (typeof urlPattern === 'string'\n        ? response.url().includes(urlPattern)\n        : urlPattern.test(response.url())) && response.status() === 200\n    );\n  }\n}\n```\n\n```typescript\n\u002F\u002F pages\u002Fdashboard.page.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\nimport { BasePage } from '.\u002Fbase.page';\n\nexport class DashboardPage extends BasePage {\n  readonly heading: Locator;\n  readonly userMenu: Locator;\n  readonly notificationBell: Locator;\n  readonly searchInput: Locator;\n\n  constructor(page: Page) {\n    super(page);\n    this.heading = page.getByRole('heading', { name: 'Dashboard' });\n    this.userMenu = page.getByRole('button', { name: \u002Fuser menu\u002Fi });\n    this.notificationBell = page.getByTestId('notification-bell');\n    this.searchInput = page.getByPlaceholder('Search...');\n  }\n\n  async goto(): Promise\u003Cvoid> {\n    await this.navigate('\u002Fdashboard');\n    await this.expectToBeLoaded();\n  }\n\n  async expectToBeLoaded(): Promise\u003Cvoid> {\n    await expect(this.heading).toBeVisible();\n    await this.waitForPageLoad();\n  }\n\n  async searchFor(query: string): Promise\u003Cvoid> {\n    await this.searchInput.fill(query);\n    await this.searchInput.press('Enter');\n    await this.waitForApiResponse('\u002Fapi\u002Fsearch');\n  }\n\n  async openUserMenu(): Promise\u003Cvoid> {\n    await this.userMenu.click();\n  }\n\n  async getNotificationCount(): Promise\u003Cnumber> {\n    const badge = this.notificationBell.locator('.badge');\n    const text = await badge.textContent();\n    return parseInt(text || '0', 10);\n  }\n\n  async expectWelcomeMessage(username: string): Promise\u003Cvoid> {\n    const message = this.page.getByText(`Welcome, ${username}`);\n    await expect(message).toBeVisible();\n  }\n}\n```\n\n## API Mocking Strategies\n\n```typescript\n\u002F\u002F helpers\u002Fmock-api.helper.ts\nimport { Page, Route } from '@playwright\u002Ftest';\n\nexport class MockApiHelper {\n  constructor(private page: Page) {}\n\n  async mockSuccess(endpoint: string, data: any): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await route.fulfill({\n        status: 200,\n        contentType: 'application\u002Fjson',\n        body: JSON.stringify(data),\n      });\n    });\n  }\n\n  async mockError(endpoint: string, status: number, message: string): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await route.fulfill({\n        status,\n        contentType: 'application\u002Fjson',\n        body: JSON.stringify({ error: message }),\n      });\n    });\n  }\n\n  async mockDelay(endpoint: string, delay: number): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await new Promise((resolve) => setTimeout(resolve, delay));\n      await route.continue();\n    });\n  }\n\n  async interceptAndModify(endpoint: string, modifier: (data: any) => any): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      const response = await route.fetch();\n      const json = await response.json();\n      const modified = modifier(json);\n\n      await route.fulfill({\n        response,\n        body: JSON.stringify(modified),\n      });\n    });\n  }\n}\n\n\u002F\u002F Usage in tests\ntest('should handle API error gracefully', async ({ page, mockApi }) => {\n  await mockApi.mockError('\u002Fapi\u002Fusers', 500, 'Internal Server Error');\n\n  await page.goto('\u002Fusers');\n  await expect(page.getByText('Something went wrong')).toBeVisible();\n});\n```\n\n## Visual Regression Testing\n\n```typescript\ntest.describe('Visual regression', () => {\n  test('homepage snapshot desktop', async ({ page }) => {\n    await page.goto('\u002F');\n    await page.waitForLoadState('networkidle');\n\n    await expect(page).toHaveScreenshot('homepage-desktop.png', {\n      fullPage: true,\n      animations: 'disabled',\n      maxDiffPixels: 100,\n    });\n  });\n\n  test('homepage snapshot mobile', async ({ page }) => {\n    await page.setViewportSize({ width: 375, height: 667 });\n    await page.goto('\u002F');\n\n    await expect(page).toHaveScreenshot('homepage-mobile.png', {\n      fullPage: true,\n      animations: 'disabled',\n    });\n  });\n\n  test('component snapshot', async ({ page }) => {\n    await page.goto('\u002Fcomponents\u002Fbutton');\n\n    const button = page.getByRole('button', { name: 'Primary' });\n    await expect(button).toHaveScreenshot('button-primary.png');\n  });\n\n  test('dark mode snapshot', async ({ page }) => {\n    await page.emulateMedia({ colorScheme: 'dark' });\n    await page.goto('\u002F');\n\n    await expect(page).toHaveScreenshot('homepage-dark.png', {\n      fullPage: true,\n    });\n  });\n});\n```\n\n## Mobile Testing Patterns\n\n```typescript\ntest.describe('Mobile-specific tests', () => {\n  test.use({ ...devices['iPhone 13'] });\n\n  test('should handle mobile navigation', async ({ page }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Open hamburger menu\n    const menuButton = page.getByRole('button', { name: 'Menu' });\n    await expect(menuButton).toBeVisible();\n    await menuButton.click();\n\n    \u002F\u002F Navigate to section\n    await page.getByRole('link', { name: 'Products' }).click();\n    await expect(page).toHaveURL('\u002Fproducts');\n  });\n\n  test('should handle touch gestures', async ({ page }) => {\n    await page.goto('\u002Fgallery');\n\n    const image = page.getByTestId('gallery-image');\n\n    \u002F\u002F Swipe left\n    await image.dragTo(image, {\n      sourcePosition: { x: 200, y: 100 },\n      targetPosition: { x: 50, y: 100 },\n    });\n\n    await expect(page.getByTestId('image-2')).toBeVisible();\n  });\n\n  test('should adapt to orientation changes', async ({ page }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Portrait\n    await page.setViewportSize({ width: 375, height: 667 });\n    await expect(page.getByTestId('mobile-menu')).toBeVisible();\n\n    \u002F\u002F Landscape\n    await page.setViewportSize({ width: 667, height: 375 });\n    await expect(page.getByTestId('desktop-menu')).toBeVisible();\n  });\n});\n```\n\n## Network Manipulation\n\n```typescript\ntest.describe('Network conditions', () => {\n  test('should handle slow 3G connection', async ({ page, context }) => {\n    await context.route('**\u002F*', async (route) => {\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      await route.continue();\n    });\n\n    await page.goto('\u002F');\n    await expect(page.getByTestId('loading-spinner')).toBeVisible();\n    await expect(page.getByRole('heading')).toBeVisible({ timeout: 20000 });\n  });\n\n  test('should handle offline mode', async ({ page, context }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Go offline\n    await context.setOffline(true);\n    await page.reload();\n\n    await expect(page.getByText('You are offline')).toBeVisible();\n\n    \u002F\u002F Go back online\n    await context.setOffline(false);\n    await page.reload();\n    await expect(page.getByRole('heading')).toBeVisible();\n  });\n});\n```\n\n## Advanced Trace Debugging\n\n```typescript\ntest('with detailed trace', async ({ page }) => {\n  \u002F\u002F Start tracing before creating the page\n  await page.context().tracing.start({\n    screenshots: true,\n    snapshots: true,\n    sources: true,\n  });\n\n  await test.step('Navigate to login page', async () => {\n    await page.goto('\u002Flogin');\n  });\n\n  await test.step('Fill login form', async () => {\n    await page.fill('#email', 'user@example.com');\n    await page.fill('#password', 'password123');\n  });\n\n  await test.step('Submit form', async () => {\n    await page.click('button[type=\"submit\"]');\n  });\n\n  await test.step('Verify dashboard loaded', async () => {\n    await expect(page.getByRole('heading')).toHaveText('Dashboard');\n  });\n\n  \u002F\u002F Stop tracing and save\n  await page.context().tracing.stop({ path: 'trace.zip' });\n});\n```\n\n## Parallel Test Execution Optimization\n\n```typescript\n\u002F\u002F tests\u002Fparallel-safe.spec.ts\nimport { test, expect } from '.\u002Ffixtures';\n\ntest.describe.configure({ mode: 'parallel' });\n\ntest.describe('Parallel safe tests', () => {\n  test('test 1 with isolated data', async ({ page, testData }) => {\n    const user = await testData.createUniqueUser();\n    await page.goto(`\u002Fusers\u002F${user.id}`);\n    \u002F\u002F Each test gets unique data\n  });\n\n  test('test 2 with isolated data', async ({ page, testData }) => {\n    const user = await testData.createUniqueUser();\n    await page.goto(`\u002Fusers\u002F${user.id}`);\n    \u002F\u002F No conflict with test 1\n  });\n});\n\n\u002F\u002F tests\u002Fserial-required.spec.ts\ntest.describe.configure({ mode: 'serial' });\n\ntest.describe('Serial tests (order matters)', () => {\n  let orderId: string;\n\n  test('step 1: create order', async ({ page }) => {\n    \u002F\u002F ... create order\n    orderId = 'ORDER-123';\n  });\n\n  test('step 2: process order', async ({ page }) => {\n    \u002F\u002F Uses orderId from previous test\n    await page.goto(`\u002Forders\u002F${orderId}`);\n  });\n});\n```\n\n## Performance Monitoring\n\n```typescript\nimport { chromium } from '@playwright\u002Ftest';\n\ntest('measure page performance', async ({ page }) => {\n  await page.goto('\u002F');\n\n  const metrics = await page.evaluate(() => {\n    const perfData = window.performance.timing;\n    return {\n      domContentLoaded: perfData.domContentLoadedEventEnd - perfData.navigationStart,\n      loadComplete: perfData.loadEventEnd - perfData.navigationStart,\n      firstPaint: performance.getEntriesByType('paint')[0]?.startTime || 0,\n    };\n  });\n\n  console.log('Performance metrics:', metrics);\n\n  expect(metrics.domContentLoaded).toBeLessThan(2000);\n  expect(metrics.loadComplete).toBeLessThan(5000);\n});\n```\n\n## Best Practices\n\n1. **Use test.step() for readability** -- Organize complex tests into logical steps.\n2. **Implement custom fixtures** -- Share setup logic and state across tests.\n3. **Enable trace on failure** -- Visual debugging is invaluable.\n4. **Use auto-waiting locators** -- `getByRole` and `getByText` are resilient.\n5. **Mock APIs for speed** -- Don't rely on real backends for fast feedback.\n6. **Test across browsers** -- Cross-browser issues are real.\n7. **Validate with screenshots** -- Visual regression catches CSS bugs.\n8. **Isolate test data** -- Each test should create its own data.\n9. **Use serial mode wisely** -- Parallelize when possible.\n10. **Monitor performance** -- Track load times as part of tests.\n\n## Anti-Patterns to Avoid\n\n1. **Not using Page Object Model** -- Duplicating selectors everywhere.\n2. **Hardcoded waits** -- Use auto-waiting instead.\n3. **Testing in one browser only** -- Cross-browser bugs are common.\n4. **Ignoring flaky tests** -- Fix them or delete them.\n5. **Not using fixtures** -- Copy-pasting setup code.\n6. **No visual regression** -- UI bugs slip through.\n7. **Testing against production** -- Always use test environments.\n8. **Shared state between tests** -- Tests must be independent.\n9. **Not recording traces** -- Debugging is much harder.\n10. **Ignoring mobile** -- Mobile users are a huge segment.\n\nPlaywright is powerful. Use its advanced features to build robust, maintainable test suites that catch bugs before production.\n","# Playwright Enhanced Skill\n\nYou are an expert QA automation engineer specializing in advanced Playwright patterns. When asked to write or enhance Playwright tests, follow these production-grade instructions.\n\n## Advanced Configuration\n\n### Multi-Environment Setup\n\n```typescript\n\u002F\u002F playwright.config.ts\nimport { defineConfig, devices } from '@playwright\u002Ftest';\n\nconst env = process.env.TEST_ENV || 'local';\n\nconst environments = {\n  local: {\n    baseURL: 'http:\u002F\u002Flocalhost:3000',\n    apiURL: 'http:\u002F\u002Flocalhost:8080',\n  },\n  staging: {\n    baseURL: 'https:\u002F\u002Fstaging.example.com',\n    apiURL: 'https:\u002F\u002Fapi-staging.example.com',\n  },\n  production: {\n    baseURL: 'https:\u002F\u002Fexample.com',\n    apiURL: 'https:\u002F\u002Fapi.example.com',\n  },\n};\n\nexport default defineConfig({\n  testDir: '.\u002Ftests',\n  fullyParallel: true,\n  forbidOnly: !!process.env.CI,\n  retries: process.env.CI ? 2 : 0,\n  workers: process.env.CI ? 1 : undefined,\n\n  reporter: [\n    ['html', { open: 'never', outputFolder: 'test-results\u002Fhtml' }],\n    ['json', { outputFile: 'test-results\u002Fresults.json' }],\n    ['junit', { outputFile: 'test-results\u002Fjunit.xml' }],\n    process.env.CI ? ['github'] : ['list'],\n  ],\n\n  use: {\n    baseURL: environments[env].baseURL,\n    trace: 'retain-on-failure',\n    screenshot: 'only-on-failure',\n    video: 'retain-on-failure',\n    actionTimeout: 15000,\n    navigationTimeout: 30000,\n  },\n\n  projects: [\n    { name: 'setup', testMatch: \u002F.*\\.setup\\.ts\u002F },\n\n    {\n      name: 'chromium',\n      use: { ...devices['Desktop Chrome'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'firefox',\n      use: { ...devices['Desktop Firefox'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'webkit',\n      use: { ...devices['Desktop Safari'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'mobile-chrome',\n      use: { ...devices['Pixel 5'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'mobile-safari',\n      use: { ...devices['iPhone 13'] },\n      dependencies: ['setup'],\n    },\n    {\n      name: 'tablet',\n      use: { ...devices['iPad Pro'] },\n      dependencies: ['setup'],\n    },\n  ],\n\n  webServer: env === 'local' ? {\n    command: 'npm run dev',\n    url: 'http:\u002F\u002Flocalhost:3000',\n    reuseExistingServer: !process.env.CI,\n    timeout: 120000,\n  } : undefined,\n});\n```\n\n## Advanced Custom Fixtures\n\n```typescript\n\u002F\u002F fixtures\u002Findex.ts\nimport { test as base, Page } from '@playwright\u002Ftest';\nimport { LoginPage } from '..\u002Fpages\u002Flogin.page';\nimport { DashboardPage } from '..\u002Fpages\u002Fdashboard.page';\n\ntype MyFixtures = {\n  loginPage: LoginPage;\n  dashboardPage: DashboardPage;\n  authenticatedPage: Page;\n  adminPage: Page;\n  mockApi: MockApiHelper;\n  testData: TestDataFactory;\n};\n\nexport const test = base.extend\u003CMyFixtures>({\n  loginPage: async ({ page }, use) => {\n    await use(new LoginPage(page));\n  },\n\n  dashboardPage: async ({ page }, use) => {\n    await use(new DashboardPage(page));\n  },\n\n  authenticatedPage: async ({ browser }, use) => {\n    const context = await browser.newContext({\n      storageState: 'playwright\u002F.auth\u002Fuser.json',\n    });\n    const page = await context.newPage();\n    await use(page);\n    await context.close();\n  },\n\n  adminPage: async ({ browser }, use) => {\n    const context = await browser.newContext({\n      storageState: 'playwright\u002F.auth\u002Fadmin.json',\n    });\n    const page = await context.newPage();\n    await use(page);\n    await context.close();\n  },\n\n  mockApi: async ({ page }, use) => {\n    const helper = new MockApiHelper(page);\n    await use(helper);\n  },\n\n  testData: async ({}, use) => {\n    const factory = new TestDataFactory();\n    await use(factory);\n    await factory.cleanup();\n  },\n});\n\nexport { expect } from '@playwright\u002Ftest';\n```\n\n### Advanced Page Object Pattern\n\n```typescript\n\u002F\u002F pages\u002Fbase.page.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\n\nexport abstract class BasePage {\n  protected page: Page;\n\n  constructor(page: Page) {\n    this.page = page;\n  }\n\n  async navigate(path: string): Promise\u003Cvoid> {\n    await this.page.goto(path);\n  }\n\n  async waitForPageLoad(): Promise\u003Cvoid> {\n    await this.page.waitForLoadState('networkidle');\n  }\n\n  async waitForElement(selector: string, timeout = 10000): Promise\u003CLocator> {\n    return this.page.waitForSelector(selector, { timeout });\n  }\n\n  async takeScreenshot(name: string): Promise\u003Cvoid> {\n    await this.page.screenshot({\n      path: `screenshots\u002F${name}.png`,\n      fullPage: true,\n    });\n  }\n\n  async scrollToElement(locator: Locator): Promise\u003Cvoid> {\n    await locator.scrollIntoViewIfNeeded();\n  }\n\n  async typeWithDelay(locator: Locator, text: string, delay = 100): Promise\u003Cvoid> {\n    await locator.type(text, { delay });\n  }\n\n  async selectDropdownOption(locator: Locator, option: string): Promise\u003Cvoid> {\n    await locator.click();\n    await this.page.getByRole('option', { name: option }).click();\n  }\n\n  async uploadFile(locator: Locator, filePath: string): Promise\u003Cvoid> {\n    await locator.setInputFiles(filePath);\n  }\n\n  async waitForApiResponse(urlPattern: string | RegExp): Promise\u003Cvoid> {\n    await this.page.waitForResponse((response) =>\n      (typeof urlPattern === 'string'\n        ? response.url().includes(urlPattern)\n        : urlPattern.test(response.url())) && response.status() === 200\n    );\n  }\n}\n```\n\n```typescript\n\u002F\u002F pages\u002Fdashboard.page.ts\nimport { Page, Locator, expect } from '@playwright\u002Ftest';\nimport { BasePage } from '.\u002Fbase.page';\n\nexport class DashboardPage extends BasePage {\n  readonly heading: Locator;\n  readonly userMenu: Locator;\n  readonly notificationBell: Locator;\n  readonly searchInput: Locator;\n\n  constructor(page: Page) {\n    super(page);\n    this.heading = page.getByRole('heading', { name: 'Dashboard' });\n    this.userMenu = page.getByRole('button', { name: \u002Fuser menu\u002Fi });\n    this.notificationBell = page.getByTestId('notification-bell');\n    this.searchInput = page.getByPlaceholder('Search...');\n  }\n\n  async goto(): Promise\u003Cvoid> {\n    await this.navigate('\u002Fdashboard');\n    await this.expectToBeLoaded();\n  }\n\n  async expectToBeLoaded(): Promise\u003Cvoid> {\n    await expect(this.heading).toBeVisible();\n    await this.waitForPageLoad();\n  }\n\n  async searchFor(query: string): Promise\u003Cvoid> {\n    await this.searchInput.fill(query);\n    await this.searchInput.press('Enter');\n    await this.waitForApiResponse('\u002Fapi\u002Fsearch');\n  }\n\n  async openUserMenu(): Promise\u003Cvoid> {\n    await this.userMenu.click();\n  }\n\n  async getNotificationCount(): Promise\u003Cnumber> {\n    const badge = this.notificationBell.locator('.badge');\n    const text = await badge.textContent();\n    return parseInt(text || '0', 10);\n  }\n\n  async expectWelcomeMessage(username: string): Promise\u003Cvoid> {\n    const message = this.page.getByText(`Welcome, ${username}`);\n    await expect(message).toBeVisible();\n  }\n}\n```\n\n## API Mocking Strategies\n\n```typescript\n\u002F\u002F helpers\u002Fmock-api.helper.ts\nimport { Page, Route } from '@playwright\u002Ftest';\n\nexport class MockApiHelper {\n  constructor(private page: Page) {}\n\n  async mockSuccess(endpoint: string, data: any): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await route.fulfill({\n        status: 200,\n        contentType: 'application\u002Fjson',\n        body: JSON.stringify(data),\n      });\n    });\n  }\n\n  async mockError(endpoint: string, status: number, message: string): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await route.fulfill({\n        status,\n        contentType: 'application\u002Fjson',\n        body: JSON.stringify({ error: message }),\n      });\n    });\n  }\n\n  async mockDelay(endpoint: string, delay: number): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      await new Promise((resolve) => setTimeout(resolve, delay));\n      await route.continue();\n    });\n  }\n\n  async interceptAndModify(endpoint: string, modifier: (data: any) => any): Promise\u003Cvoid> {\n    await this.page.route(endpoint, async (route: Route) => {\n      const response = await route.fetch();\n      const json = await response.json();\n      const modified = modifier(json);\n\n      await route.fulfill({\n        response,\n        body: JSON.stringify(modified),\n      });\n    });\n  }\n}\n\n\u002F\u002F Usage in tests\ntest('should handle API error gracefully', async ({ page, mockApi }) => {\n  await mockApi.mockError('\u002Fapi\u002Fusers', 500, 'Internal Server Error');\n\n  await page.goto('\u002Fusers');\n  await expect(page.getByText('Something went wrong')).toBeVisible();\n});\n```\n\n## Visual Regression Testing\n\n```typescript\ntest.describe('Visual regression', () => {\n  test('homepage snapshot desktop', async ({ page }) => {\n    await page.goto('\u002F');\n    await page.waitForLoadState('networkidle');\n\n    await expect(page).toHaveScreenshot('homepage-desktop.png', {\n      fullPage: true,\n      animations: 'disabled',\n      maxDiffPixels: 100,\n    });\n  });\n\n  test('homepage snapshot mobile', async ({ page }) => {\n    await page.setViewportSize({ width: 375, height: 667 });\n    await page.goto('\u002F');\n\n    await expect(page).toHaveScreenshot('homepage-mobile.png', {\n      fullPage: true,\n      animations: 'disabled',\n    });\n  });\n\n  test('component snapshot', async ({ page }) => {\n    await page.goto('\u002Fcomponents\u002Fbutton');\n\n    const button = page.getByRole('button', { name: 'Primary' });\n    await expect(button).toHaveScreenshot('button-primary.png');\n  });\n\n  test('dark mode snapshot', async ({ page }) => {\n    await page.emulateMedia({ colorScheme: 'dark' });\n    await page.goto('\u002F');\n\n    await expect(page).toHaveScreenshot('homepage-dark.png', {\n      fullPage: true,\n    });\n  });\n});\n```\n\n## Mobile Testing Patterns\n\n```typescript\ntest.describe('Mobile-specific tests', () => {\n  test.use({ ...devices['iPhone 13'] });\n\n  test('should handle mobile navigation', async ({ page }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Open hamburger menu\n    const menuButton = page.getByRole('button', { name: 'Menu' });\n    await expect(menuButton).toBeVisible();\n    await menuButton.click();\n\n    \u002F\u002F Navigate to section\n    await page.getByRole('link', { name: 'Products' }).click();\n    await expect(page).toHaveURL('\u002Fproducts');\n  });\n\n  test('should handle touch gestures', async ({ page }) => {\n    await page.goto('\u002Fgallery');\n\n    const image = page.getByTestId('gallery-image');\n\n    \u002F\u002F Swipe left\n    await image.dragTo(image, {\n      sourcePosition: { x: 200, y: 100 },\n      targetPosition: { x: 50, y: 100 },\n    });\n\n    await expect(page.getByTestId('image-2')).toBeVisible();\n  });\n\n  test('should adapt to orientation changes', async ({ page }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Portrait\n    await page.setViewportSize({ width: 375, height: 667 });\n    await expect(page.getByTestId('mobile-menu')).toBeVisible();\n\n    \u002F\u002F Landscape\n    await page.setViewportSize({ width: 667, height: 375 });\n    await expect(page.getByTestId('desktop-menu')).toBeVisible();\n  });\n});\n```\n\n## Network Manipulation\n\n```typescript\ntest.describe('Network conditions', () => {\n  test('should handle slow 3G connection', async ({ page, context }) => {\n    await context.route('**\u002F*', async (route) => {\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      await route.continue();\n    });\n\n    await page.goto('\u002F');\n    await expect(page.getByTestId('loading-spinner')).toBeVisible();\n    await expect(page.getByRole('heading')).toBeVisible({ timeout: 20000 });\n  });\n\n  test('should handle offline mode', async ({ page, context }) => {\n    await page.goto('\u002F');\n\n    \u002F\u002F Go offline\n    await context.setOffline(true);\n    await page.reload();\n\n    await expect(page.getByText('You are offline')).toBeVisible();\n\n    \u002F\u002F Go back online\n    await context.setOffline(false);\n    await page.reload();\n    await expect(page.getByRole('heading')).toBeVisible();\n  });\n});\n```\n\n## Advanced Trace Debugging\n\n```typescript\ntest('with detailed trace', async ({ page }) => {\n  \u002F\u002F Start tracing before creating the page\n  await page.context().tracing.start({\n    screenshots: true,\n    snapshots: true,\n    sources: true,\n  });\n\n  await test.step('Navigate to login page', async () => {\n    await page.goto('\u002Flogin');\n  });\n\n  await test.step('Fill login form', async () => {\n    await page.fill('#email', 'user@example.com');\n    await page.fill('#password', 'password123');\n  });\n\n  await test.step('Submit form', async () => {\n    await page.click('button[type=\"submit\"]');\n  });\n\n  await test.step('Verify dashboard loaded', async () => {\n    await expect(page.getByRole('heading')).toHaveText('Dashboard');\n  });\n\n  \u002F\u002F Stop tracing and save\n  await page.context().tracing.stop({ path: 'trace.zip' });\n});\n```\n\n## Parallel Test Execution Optimization\n\n```typescript\n\u002F\u002F tests\u002Fparallel-safe.spec.ts\nimport { test, expect } from '.\u002Ffixtures';\n\ntest.describe.configure({ mode: 'parallel' });\n\ntest.describe('Parallel safe tests', () => {\n  test('test 1 with isolated data', async ({ page, testData }) => {\n    const user = await testData.createUniqueUser();\n    await page.goto(`\u002Fusers\u002F${user.id}`);\n    \u002F\u002F Each test gets unique data\n  });\n\n  test('test 2 with isolated data', async ({ page, testData }) => {\n    const user = await testData.createUniqueUser();\n    await page.goto(`\u002Fusers\u002F${user.id}`);\n    \u002F\u002F No conflict with test 1\n  });\n});\n\n\u002F\u002F tests\u002Fserial-required.spec.ts\ntest.describe.configure({ mode: 'serial' });\n\ntest.describe('Serial tests (order matters)', () => {\n  let orderId: string;\n\n  test('step 1: create order', async ({ page }) => {\n    \u002F\u002F ... create order\n    orderId = 'ORDER-123';\n  });\n\n  test('step 2: process order', async ({ page }) => {\n    \u002F\u002F Uses orderId from previous test\n    await page.goto(`\u002Forders\u002F${orderId}`);\n  });\n});\n```\n\n## Performance Monitoring\n\n```typescript\nimport { chromium } from '@playwright\u002Ftest';\n\ntest('measure page performance', async ({ page }) => {\n  await page.goto('\u002F');\n\n  const metrics = await page.evaluate(() => {\n    const perfData = window.performance.timing;\n    return {\n      domContentLoaded: perfData.domContentLoadedEventEnd - perfData.navigationStart,\n      loadComplete: perfData.loadEventEnd - perfData.navigationStart,\n      firstPaint: performance.getEntriesByType('paint')[0]?.startTime || 0,\n    };\n  });\n\n  console.log('Performance metrics:', metrics);\n\n  expect(metrics.domContentLoaded).toBeLessThan(2000);\n  expect(metrics.loadComplete).toBeLessThan(5000);\n});\n```\n\n## Best Practices\n\n1. **Use test.step() for readability** -- Organize complex tests into logical steps.\n2. **Implement custom fixtures** -- Share setup logic and state across tests.\n3. **Enable trace on failure** -- Visual debugging is invaluable.\n4. **Use auto-waiting locators** -- `getByRole` and `getByText` are resilient.\n5. **Mock APIs for speed** -- Don't rely on real backends for fast feedback.\n6. **Test across browsers** -- Cross-browser issues are real.\n7. **Validate with screenshots** -- Visual regression catches CSS bugs.\n8. **Isolate test data** -- Each test should create its own data.\n9. **Use serial mode wisely** -- Parallelize when possible.\n10. **Monitor performance** -- Track load times as part of tests.\n\n## Anti-Patterns to Avoid\n\n1. **Not using Page Object Model** -- Duplicating selectors everywhere.\n2. **Hardcoded waits** -- Use auto-waiting instead.\n3. **Testing in one browser only** -- Cross-browser bugs are common.\n4. **Ignoring flaky tests** -- Fix them or delete them.\n5. **Not using fixtures** -- Copy-pasting setup code.\n6. **No visual regression** -- UI bugs slip through.\n7. **Testing against production** -- Always use test environments.\n8. **Shared state between tests** -- Tests must be independent.\n9. **Not recording traces** -- Debugging is much harder.\n10. **Ignoring mobile** -- Mobile users are a huge segment.\n\nPlaywright is powerful. Use its advanced features to build robust, maintainable test suites that catch bugs before production.\n",{"name":5,"tags":24,"agents":32,"author":43,"domains":44,"license":15,"version":47,"languages":48,"frameworks":51,"description":7,"testingTypes":52},[25,26,27,28,29,30,31],"playwright","e2e","advanced","fixtures","trace-viewer","visual-testing","mobile-testing",[33,34,35,36,37,38,39,40,41,42],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[45,46],"web","mobile","1.0.0",[49,50],"typescript","javascript",[25],[26,53],"visual","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fplaywright-skill-enhanced","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Playwright Enhanced\"",{"tool":68,"command":69},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Playwright Enhanced\"",{"tool":71,"command":72},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Playwright Enhanced\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fplaywright-skill-enhanced\u002FSKILL.md",true,[],[77,85,92,99,106,113],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]