Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

verdex-playwright-complete

БесплатноБез исполняемых скриптовНе проверен

Complete Playwright test authoring workflow with Verdex MCP tools. Three phases - explore apps interactively to map user journeys, build stable role-first…

verdexhqот verdexhq★ 17 звёзд на GitHub8 установок в других каталогах

Об этом скилле

Verdex Playwright Complete Workflow

Complete test authoring in three phases: Explore → Select → Test

When to Use This Skill

Use this skill when you need to:

  • Explore unfamiliar web applications and map user workflows
  • Write stable, maintainable Playwright selectors that avoid positional .nth() selectors
  • Create production-ready Playwright tests following best practices
  • Understand complex UIs through progressive DOM exploration

The Complete Workflow

Phase 1: Explore & Map Workflows 🗺️

Goal: Understand the application and user journeys before writing any code

When to read the detailed guide: When starting work on a new application or feature

  • Read guides/workflow-discovery.md for interactive exploration techniques
  • Use Verdex MCP browser tools (browser_navigate, browser_click, browser_snapshot) with refs
  • Document user journeys, state transitions, and assertion points
  • Identify all interactive elements and their behaviors

Phase 2: Build Stable Selectors 🎯

Goal: Convert exploration discoveries into production-ready Playwright selectors

When to read the detailed guide: After workflow exploration, when you have refs and need selectors

  • Read guides/selector-writing.md for comprehensive selector patterns
  • Use the Container → Content → Role pattern
  • Apply progressive DOM exploration (resolve_container, inspect_pattern, extract_anchors)
  • Check uniqueness first—many elements need only simple selectors

Phase 3: Write Idiomatic Tests ✍️

Goal: Transform selectors and workflows into clean, maintainable Playwright tests

When to read the detailed guide: When you have selectors and workflows ready to code

  • Read guides/playwright-patterns.md for test structure and patterns
  • Follow Arrange-Act-Assert pattern
  • Use Playwright's auto-waiting (avoid manual waits)
  • Create independent, focused tests

Quick Start (Most Common Path)

Step 1: Explore the Application

await browser_initialize()
await browser_navigate("https://your-app.com")
// Snapshot shows interactive elements with refs (e1, e2, e3...)

// Click and interact using refs to explore
await browser_click("e5")
await browser_snapshot()  // See what changed

Document what you learn: URLs, actions, expected outcomes

Step 2: Build Selectors

Check uniqueness FIRST:

// Is element unique? If YES → use simple selector
page.getByRole("button", { name: "Proceed to Checkout" })

// If NO → use Container → Content → Role pattern
page
  .getByTestId("product-card")
  .filter({ hasText: "iPhone 15 Pro" })
  .getByRole("button", { name: "Add to Cart" })

Progressive exploration when needed:

resolve_container("e25")     // Find stable containers
inspect_pattern("e25", 2)    // Understand siblings
extract_anchors("e25", 1)    // Mine deep content (optional)

Step 3: Write Tests

test('should add product to cart', async ({ page }) => {
  // Arrange
  await page.goto('/products')
  
  // Act
  await page
    .getByTestId('product-card')
    .filter({ hasText: 'iPhone 15 Pro' })
    .getByRole('button', { name: 'Add to Cart' })
    .click()
  
  // Assert
  await expect(page.getByText('Item added to cart')).toBeVisible()
  await expect(page.getByRole('link', { name: /Cart \(1\)/ })).toBeVisible()
})

Core Principles (Keep These in Mind)

The Winning Pattern: Container → Content → Role

page
  .getByTestId("stable-container")           // 1. Scope to container
  .filter({ hasText: "unique-content" })     // 2. Filter by content
  .getByRole("button", { name: "Action" })   // 3. Target by role

Critical Anti-Patterns to Avoid

// ❌ NEVER: Positional selectors
page.getByRole("button").nth(5)
page.getByRole("button").first()  // .first() = .nth(0), still brittle

// ❌ NEVER: Filter in wrong place
page.getByRole("button").filter({ hasText: "text-in-sibling" })

// ❌ NEVER: Parent traversal
page.getByText("text").locator("..")

// ✅ ALWAYS: Check uniqueness first
const count = await page.getByRole("button", { name: "Submit" }).count()
// If count === 1, use simple selector. If > 1, add container scoping.

Decision Trees

Which Guide Should I Read?

Are you starting work on a new app/feature?
├─ YES → Read guides/workflow-discovery.md
│        Learn: Interactive exploration, mapping user journeys
│        Tools: browser_navigate, browser_click, browser_snapshot
│        Output: Workflow documentation with refs
│
└─ NO → Do you have refs and need to build selectors?
    ├─ YES → Read guides/selector-writing.md
    │        Learn: Container → Content → Role pattern
    │        Tools: resolve_container, inspect_pattern, extract_anchors
    │        Output: Stable Playwright selectors
    │
    └─ NO → Ready to write test code?
Полный SKILL.md на GitHub

Установить verdex-playwright-complete в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

guides/playwright-patterns.mdguides/selector-writing.mdguides/workflow-discovery.md

FAQ

Что делает скилл verdex-playwright-complete?

Complete Playwright test authoring workflow with Verdex MCP tools. Three phases - explore apps interactively to map user journeys, build stable role-first selectors via progressive DOM exploration, write idiomatic Playwright tests. Includes workflow discovery, selector patterns, and testing best practices.

Как установить скилл verdex-playwright-complete?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл verdex-playwright-complete запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить verdex-playwright-complete с