playwright-go
playwright-go copied to clipboard
Add run option to install browsers with dependencies
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})
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.