---
title: "Test in more than one browser and size · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/browsers-and-sizes
updated: 2026-10-20
licence: "All rights reserved"
---

# Test in more than one browser and size

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
- Rule: Run the critical journeys in at least two browser engines, at phone and desktop width.
- How: Configure projects for Chromium and WebKit, at a desktop size and a phone size. Firefox adds a third engine. Keep the rest of the suite on one browser to save time.
- Check: The test report lists each journey passing in two engines and two screen sizes.

Example:

```js
// playwright.config.js
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },
    { name: 'phone-chromium', use: { ...devices['Pixel 7'] } },
    { name: 'phone-webkit', use: { ...devices['iPhone 15'] } },
  ],
});
```

```python
# conftest.py for pytest-playwright, run with: pytest --browser chromium --browser webkit
import pytest

@pytest.fixture(params=[(390, 844), (1280, 800)], ids=["phone", "desktop"])
def browser_context_args(browser_context_args, request):
    width, height = request.param
    return {**browser_context_args, "viewport": {"width": width, "height": height}}
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers testing playbook: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/browsers-and-sizes`.

- Previous: [Run browser tests against the production build](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/test-the-built-app)
- Next: [Smoke test every deploy](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/smoke-test-every-deploy)
- [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
