microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.06k stars 3.6k forks source link

[Feature] Complete silent install via the command line #16616

Closed TheTooz closed 2 years ago

TheTooz commented 2 years ago

Unless I completely missed something on the documentation, I cannot install playwright without some manual input. Namely choosing typescript vs javascript, et al.

To make the lives of our CI team easier, and not require continual updates to our machine images, we would like to be able to install playwright on the fly without any user intervention.

aslushnikov commented 2 years ago

@fuglyducky So why do you want to run npm init playwright on CI? This should never be the case unless you do some meta-automation!

TheTooz commented 2 years ago

@aslushnikov, that is a good question. Our test nodes do not have node installed in their images so we need to install node, and then install playwright. To avoid issues where we have an old version of node and/or playwright in our images, I was just wondering if there is a way to completely automate the installation and configuration process.

aslushnikov commented 2 years ago

@fuglyducky usually this is solved by package-lock.json. It will pin all the packages to proper versions and install them and their dependencies, giving you reproducible builds!

aslushnikov commented 2 years ago

Since my rotation is over, let me close this for now. If you do think that package-lock.json is not suitable for some reason for you, please feel free to open a new issue! :)

QAscoop commented 11 months ago

I do need to accomplish this by specifying JavaScript at installation command for silent install instead of the default TypeScript for my dockerized setup