Skip to content

Instantly share code, notes, and snippets.

@VladSez
Created June 15, 2022 22:14
Show Gist options
  • Save VladSez/bdbf682c7d37207f0bc310f30391288c to your computer and use it in GitHub Desktop.
Save VladSez/bdbf682c7d37207f0bc310f30391288c to your computer and use it in GitHub Desktop.
Force GPU hardware acceleration in playwright. More info: https://michelkraemer.com/enable-gpu-for-slow-playwright-tests-in-headless-mode/
const config = {
use: {
channel: "chrome",
deviceScaleFactor: 2,
launchOptions: {
// force GPU hardware acceleration (even in headless mode)
// without hardware acceleration, our tests will be much slower
args: ["--use-gl=egl"]
}
}
}
module.exports = config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment