playwright-community / playwright-go

Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
https://playwright-community.github.io/playwright-go/
MIT License
2.26k stars 163 forks source link

feat: remove hardcoded subdirectories to RunOptions.DriverDirectory #501

Closed canstand closed 2 weeks ago

canstand commented 1 month ago

BREAKING CHANGE: When specifying the playwright driver directory via RunOptions.DriverDirectory or the PLAYWRIGHT_DRIVER_PATH environment variable, you need to point directly to the directory of the corresponding version. The previously hard-coded ms-playwright-go/x.xx.x subdirectory is now only applies to the default cache directory. (close #496)

canstand commented 4 weeks ago

Hi @mxschmitt , this change makes RunOptions.DriverDirectory point to the preinstalled path, just like playwright-java's PreinstalledDriver. driverDir. I think it's a reasonable change. For example I can reuse the installed drivers of pytest-playwright. Otherwise you can only rely on symbolic links to the filesystem.

What do you think?