Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

add-on registry tests last commit release

DDEV Playwright

Overview

This add-on installs Playwright and browsers (Chromium, Firefox, WebKit) in the DDEV web container so you can run tests against the project’s internal network and dependencies. It also configures X11 forwarding for headed mode (visible browser windows on the host).

Installation

ddev add-on get MurzNN/ddev-playwright

What it does

X11 / headed mode

By default the add-on:

  1. Runs xhost +local:docker on the host before start.
  2. Bind-mounts /tmp/.X11-unix into the web container.
  3. Sets DISPLAY=:0 in the container.
  4. Sets LIBGL_ALWAYS_SOFTWARE=1 so Chromium/Mesa do not hang trying to use GPU/DRM inside Docker when no window appears.

macOS / rootless Docker alternative

When bind-mounting /tmp/.X11-unix is not possible (for example rootless Docker on macOS), use the commented alternative in .ddev/config.playwright.yaml:

web_environment:
  - DISPLAY=host.docker.internal:0

You still need xhost +local:docker (or equivalent) on the host so Docker can connect to the X server.

Credits

Contributed and maintained by @MurzNN

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.