Playwright Browser Automation on Windows
Table of Content
Launch Playwright Browser Automation on Windows
Go to the listings page Playwright Browser Automation on Windows on Azure Marketplace.
- 2 Click on 'Get it now', then follow the instructions on the page to launch the Virtual Machine.
- 1 Go to the Virtual machine service in the Azure portal.
- 2 Click 'Add' -> 'Virtual Machine'.
Under Image click on 'See all images'. Search for 'playwright' and select 'Playwright Browser Automation on Windows'.
- 4 Fill out all needed informations and launch the Virtual Machine.
Connect to your instance via RDP
Run our sample code and develop your own scripts:
- 1 Connect to the instance via RDP and log into the user you created in the Azure Portal.
Open Command Line Interface. Navigate into C:\Playwright directory by
Run the sample code by
node script.jsYou can watch the browser execute the sample script:
Note: The first execution after startup is very slow, especially on VMs with low memory configured, the browser can run out of memory. The performance increases with time. So in case the browser exceeds the start up limit (30 seconds), just try again.
- 4 By opening the folder C: -> Playwright you can see taken screenshots.
- 5 Edit the script by right-click -> Open with Notepad++. You can find demo code for all available browsers in Playwright within the script. When you are done, save the file.
Switch back to the Command Prompt window and run changed scripts again by