Test across multiple browsers and devices for cross-browser compatibility.
Use when ensuring cross-browser or device compatibility.
Trigger with phrases like "test browser compatibility", "check cross-browser", or "validate on browsers".
Test web applications across multiple browsers, rendering engines, and real devices. Validates CSS rendering, JavaScript API support, layout consistency, and interactive behavior across Chromium (Chrome, Edge), Gecko (Firefox), and WebKit (Safari) -- locally with Playwright or on real devices via BrowserStack, Sauce Labs, LambdaTest, or Kobiton.
Prerequisites
Playwright installed (npx playwright install --with-deps) and application running at a test URL
For cloud testing: provider credentials in environment variables (see ${CLAUDE_SKILL_DIR}/references/cloud-providers.md)
Instructions
Mode 1: Local Testing (Playwright)
Default mode. Zero cloud accounts needed.
Define the browser matrix from project browserslist config or use defaults:
Grep for modern JS APIs (IntersectionObserver, structuredClone, Array.at(), Promise.withResolvers())
Grep for modern CSS (container queries, has(), @layer, subgrid, color-mix())
Cross-reference against caniuse data; flag usage without polyfills or @supports
Write compatibility-focused tests:
Layout: key elements render at expected positions/sizes per viewport
CSS features: modern features degrade gracefully behind @supports
JS APIs: polyfills load in older browsers; form inputs (date, color, range) across engines
Accessibility: run axe-core per browser (@axe-core/playwright)
Execute and capture results:
npx playwright test --project=chromium --project=firefox --project=webkit
Screenshots per browser for visual comparison
Video traces for failing tests
Mode 2: Cloud Real-Device Testing
Applies when real physical devices, broader OS coverage, or carrier network conditions are required beyond what Playwright emulation can replicate. Read ${CLAUDE_SKILL_DIR}/references/cloud-providers.md for full auth, API, and capabilities details.
Provider selection:
Need
Provider
Broadest browser/OS matrix (3,000+ combos)
BrowserStack
Enterprise CI/CD, Sauce Connect tunnel
Sauce Labs
Auto-healing selectors, smart testing
LambdaTest
Real physical devices, scriptless automation
Kobiton
Never hardcode credentials. Set provider env vars (BROWSERSTACK_USERNAME/ACCESS_KEY, SAUCE_USERNAME/ACCESS_KEY, LT_USERNAME/ACCESS_KEY, KOBITON_USERNAME/API_KEY).
Verify credentials are set for the chosen provider
Query available devices/browsers via provider API
Configure WebDriver or Appium capabilities (see ${CLAUDE_SKILL_DIR}/references/cloud-providers.md)