Use the playwright build extension to use Playwright with Trigger.dev
dev
command.browsers
: Array of browsers to install. Valid values: "chromium"
, "firefox"
, "webkit"
. Default: ["chromium"]
.
headless
: Run browsers in headless mode. Default: true
. If set to false
, a virtual display (Xvfb) will be set up automatically.
version
: Playwright version to install. If not provided, the version will be auto-detected from your dependencies (recommended).
headless: false
. This will automatically set up a virtual display using Xvfb.
PLAYWRIGHT_BROWSERS_PATH
: Set to /ms-playwright
so Playwright finds the installed browsersPLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
: Set to 1
to skip browser download at runtimePLAYWRIGHT_SKIP_BROWSER_VALIDATION
: Set to 1
to skip browser validation at runtimeDISPLAY
: Set to :99
if headless: false
(for Xvfb)chromium
, but you can adapt it for other browsers:
getBrowser()
in your task’s run
function to access the browser instance: