PlaywrightJS Installation
Check the official documentation for a detailed explanation on any topic.
NodeJS installation
Download NodeJS from NodeJS (latest LTS version recommended)
Install NodeJS and check if NodeJS installation is ok by running this from the command line:
> node –version
PlayWright Project Setup
Create a directory and then move into it
> md playwright_test
> cd playwright_test
Initialize a NodeJS project with default parameters
playwright_test > npm i -y
Install PlaywrightJS local library
playwright_test > npm i -D playwright
This will install PlaywrightJS, and all browser binaries
Install PlaywrightJS command line interface globally
> npm i -g playwright-cli
This will install the Playwright CLI, used to automate UI interaction scripts.