assertions

Auto-retry until timeout. Safe for dynamic content.

Content Preview
# Assertions Reference

## Web-First Assertions (Always Use These)

Auto-retry until timeout. Safe for dynamic content.

```typescript
// Visibility
await expect(locator).toBeVisible();
await expect(locator).not.toBeVisible();
await expect(locator).toBeHidden();

// Text
await expect(locator).toHaveText('exact text');
await expect(locator).toHaveText(/partial/i);
await expect(locator).toContainText('partial');

// Value (inputs)
await expect(locator).toHaveValue('entered text');
await expect(loc
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/assertions.md \
  https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/engineering-team/playwright-pro/reference/assertions.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/alirezarezvani/claude-skills

Then reference at engineering-team/playwright-pro/reference/assertions.md

Related Skills