-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Is there an API endpoint to get the binary download URLs? #4381
Comments
Hi, it's only guaranteed that the playwright version from NPM works with the attached browser version from the browsers.json (attached to the NPM package). It's not recommended to install them manually, what is the exact use case for it? I'm curious. |
Thanks for the response @mxschmitt. What I'm trying to do is manually manage the binaries - outside Playwright (because of the nature of project). Both local browsers (installed by Playwright) & hermetic install is not helpful in my case because it runs on CI - containerized, different agents and node_modules are cached externally. So, the ideal solution now is to download binaries during the agent setup before test run. |
If it's a docker container, what it is so far, then it's recommended to use the official Docker image with the specific version tag, they contain the browsers so they won't get downloaded over and over again, would that work for you? https://playwright.dev/#version=v1.5.2&path=docs%2Fdocker%2FREADME.md&q= |
I was a bit hesitant to reference this docker image because my setup currently builds its own ubuntu image and if layer the playwright image on top of it, would it cause any issue? Secondly, to skip the browser downloads during npm install, do I need to use the env var to skip the downloads or would it already know that the binaries are available in local cache? |
I would use the Playwright docker image as a base image which is also either Ubuntu 18 or 20 and then you can install your own Node.js version or apt dependencies if you want. That should work. |
It does not seem like you are consuming these binaries using Playwright, is that so? I.e. what is your use case and how is it relevant to Playwright? |
@mxschmitt Thanks, I'll try it out. It could be tricky with the current xenial image I'm using but will work around it. Thanks for the tip about tag version matching. |
Ok then, if Docker solves it for you, closing this! |
For projects managing the binaries separately, is there an endpoint or something like that to get the URL of latest binary?
We can build download URLs like
https://playwright.azureedge.net/builds/{browser}/{version}/{browser}-{os}.zip
BUT A. not sure if this is a reliable approach B. there is no automated way to get the latest version number (without having to install the latest playwright package or use unpkg.com)The text was updated successfully, but these errors were encountered: