Skip to main content
Playwright is a Node.js library for automating web browsers, supporting tasks like UI testing, web scraping, form submissions, and page interactions. Playwright works with Chromium, Firefox, and WebKit browsers, and supports JavaScript, TypeScript, Python, and C#. For more information, visit the Playwright official website.

Check whether Node.js is installed

Before anything, check whether Node.js is installed. Open a terminal (Command Prompt or shell) and run:
If you get a version number, Node.js is already installed. The version number looks like this:
Terminal showing the installed Node.js version number
In that case, skip ahead to Step 2 and install Playwright. If Node.js is not installed on your system, you get this error instead:
If that is your case, continue with the steps below.

Step 1: Install Node.js

1

Download Node.js

Go to the Node.js official website and download the LTS version for your operating system.
Node.js download page with the LTS version highlighted
2

Install Node.js

Run the installer you downloaded and follow the installation wizard.
Node.js installation wizard

Step 2: Install Playwright

1

Run the installer

Install Playwright globally by running the following command:
2

Configure the project

Follow the prompts to configure the project, and make sure browsers are installed when prompted. The screenshot below is one example, but you can make your own choices.
Playwright setup prompts in the terminal
After Playwright is installed, you get the following message:
Terminal message confirming Playwright was installed

Step 3: Create a project directory

Create a directory for your project and go to that location:
Create and navigate to the subdirectory for scripts:

Step 4: Set up Playwright with a NodeMaven proxy

Create a new file called playwright_ip_whitelist.js in your src directory using your preferred text editor, then add the following code:
The script above uses IP whitelisting, so replace the proxy URL with your own.

Step 5: Run your script

Open Command Prompt, navigate to the src directory, and run:
The Command Prompt prints the page title:
Command Prompt showing the page title printed by the Playwright script
You are now ready to personalize your script and start using Playwright with NodeMaven proxies.