Skip to main content
Use Case

Playwright email testing made reliable.

Stop using cy.wait() and inbox polling. Inboxical's Playwright SDK gives you first-class fixtures for inbox creation, long-polling message wait, and automatic OTP extraction.

How it works

Three steps to reliable email testing in Playwright.

1

Install the SDK

npm install @inboxical/playwright — adds fixtures and helpers to your Playwright project.

2

Use fixtures in tests

The inbox fixture creates an isolated inbox per test. No shared state, no conflicts in parallel runs.

3

Assert with confidence

Long-poll for messages, check subjects, extract OTPs — no arbitrary waits or flaky polling loops.

Complete email verification test

A real-world Playwright test using Inboxical fixtures.

email-verification.spec.ts
import { test, expect } from '@playwright/test'
import { inboxical } from '@inboxical/playwright'
test('user receives welcome email with OTP', async ({ page }) => {
const inbox = await inboxical.createInbox()
// Register with the test inbox email
await page.goto('/register')
await page.fill('[name=email]', inbox.emailAddress)
await page.fill('[name=password]', 'TestPass123!')
await page.click('[type=submit]')
// Wait for the welcome email (long-polls, no arbitrary delay)
const messages = await inboxical.waitForMessages(inbox.id)
// Assert email content
expect(messages[0].subject).toBe('Welcome to Acme!')
expect(messages[0].from).toContain('[email protected]')
// Extract and use OTP
const otp = messages[0].extractedOtp
expect(otp).toHaveLength(6)
await page.fill('[name=otp]', otp)
await page.click('[type=submit]')
await expect(page.locator('h1')).toContainText('Dashboard')
})

Why teams choose Inboxical for Playwright

Purpose-built for test automation — not bolted on.

First-class fixtures

Inject inbox directly into your test via Playwright's fixture system. No global setup needed.

Parallel-safe

Each test gets its own isolated inbox. Run hundreds of tests in parallel with zero interference.

Long-polling wait

waitForMessages() blocks until the email arrives. No setTimeout, no retry loops, no flakiness.

OTP extraction

Auto-extract 4-8 digit codes from email bodies. No regex parsing in your test code.

CI/CD ready

Works in GitHub Actions, GitLab CI, CircleCI — anywhere Playwright runs. Just set your API key.

Full email inspection

Check subject, from, to, body, HTML, headers, and attachments via a clean API.

Start testing emails in Playwright today.

Try Inboxical with 50 emails/month on the free plan. Get the Playwright SDK from day one.