Prompt

How do I test a website across browsers with browser automation?

Technology / Testing & QA1 observationLast seen Oct 26, 2026

Latest observation

Oct 26, 2026OpenAI APIWeb search: off

To test a website across browsers with browser automation, use a cross-browser testing tool that can run the same test suite on Chromium, Firefox, and WebKit (Safari engine). The most common options are:

  • Playwright: great for modern cross-browser automation
  • Selenium WebDriver: widely supported, more traditional
  • Cypress: mostly Chromium-focused, limited true cross-browser coverage compared to Playwright/Selenium

Recommended approach: Playwright

1) Install Playwright

npm init playwright@latest

2) Write a simple test

Example in JavaScript:

import { test, expect } from '@playwright/test';

test('homepage loads', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveTitle(/Example/);
});

3) Run across browsers

Playwright can run the same test on multiple browsers by default:

npx playwright test

Or specify projects in playwright.config.js:

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },
  ],
});

4) Add assertions for browser differences

Test:

  • layout/visibility
  • form behavior
  • navigation
  • JavaScript functionality
  • responsive design

Examples:

  • clicking buttons
  • filling forms
  • checking viewport-specific UI
  • comparing screenshots

5) Use visual regression testing

Capture screenshots in each browser and compare them against baselines:

await expect(page).toHaveScreenshot();

This helps catch CSS/layout differences across engines.

6) Run in CI

Use GitHub Actions, GitLab CI, Jenkins, etc. Example:

- run: npx playwright install --with-deps
- run: npx playwright test

If you prefer Selenium

Use browser-specific drivers and run the same suite against:

  • ChromeDriver
  • GeckoDriver
  • SafariDriver
  • EdgeDriver

This is more manual than Playwright, but very flexible.

Best practices

  • Test user flows, not implementation details
  • Keep tests independent
  • Use stable selectors like data-testid
  • Run headless in CI, headed locally for debugging
  • Use retries sparingly
  • Keep browser versions pinned where possible

Practical recommendation

If you're starting fresh, use Playwright for most cross-browser automation needs. It’s the easiest way to test Chromium, Firefox, and WebKit with one codebase.

If you want, I can give you:

  1. a Playwright setup from scratch,
  2. a Selenium example, or
  3. a CI pipeline for cross-browser testing.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.