🚀 We are hiring! See open positions

Playwright Knowledgebase

Playwright is a powerful open-source automation library for web browsers, developed by Microsoft. It allows developers to control real web browsers like Chromium, Firefox, and WebKit with a single API in multiple programming languages, including Python, JavaScript, and Java.

Playwright is an evolution of the Puppeteer library, designed to provide more features and better support for modern web applications. While Playwright is intended for web application testing it has a growing web scraping community and implements most features needed for headless browser scraping.

See below for more on Playwright in the context of web scraping and data programming 👇

How to take screenshots in NodeJS?

Learn how to screenshot in Node.js using Playwright & Puppeteer. Includes installation, concepts, and customization tips.

#screenshots
#headless-browser
#puppeteer
#playwright
#nodejs

How to click on cookie popups and modal alerts in Playwright?

To click on modal popups like the infamous cookie conset alert we can either find and click the agree button or remove it entirely. Here's how.

#playwright

How to handle popup dialogs in Playwright?

To handle alert-type pop ups in Playwright the on "dialog" event can be captured and interacted with in both Python and NodeJS playwright clients

#playwright
#python

How to scroll to the bottom of the page with Playwright?

Learn how to scroll to the bottom of the page with Playwright using three distinct approaches for both Python and NodeJS clients.

#playwright

How to check if element exists in Playwright?

To check whether an HTML element is present on the page using Playwright the page.locator() method can be used. Here's how.

#playwright
#python

How to run Playwright in Jupyter notebooks?

Learn why the synchronous execution of Playwright is blocked on Jupyter notebooks and how to solve it using asyncio.

#playwright
#jupyter

How to take a screenshot with Playwright?

To take page screenshots in playwright we can use page.screenshot() method. Here's how to select areas and how to screenshot them in playwright.

#playwright
#python

How to load local files in Playwright?

To load local files as page URLs in Playwright we can use the file:// protocol. Here's how to do it.

#playwright

Articles Related to Playwright