playwright-go icon indicating copy to clipboard operation
playwright-go copied to clipboard

Add run option to install browsers with dependencies

Open Andrzej opened this issue 1 year ago • 1 comments

Currently, it is possible to install Playwright with its dependencies from Golang by using this syntax:

err := playwright.Install(&playwright.RunOptions{Browsers: []string{"--with-deps"}})

This PR introduces a more elegant solution:

err := playwright.Install(&playwright.RunOptions{WithDependencies: true})

Andrzej avatar Feb 06 '24 23:02 Andrzej

Installing dependencies requires root permissions. If the program cannot switch to root permissions, it will cause a hang. So it is not recommended to add this option.

canstand avatar Feb 27 '24 02:02 canstand