Skip to content

playwrightvsundetected-chromedriver

Apache-2.0 613 29 86,137
185.2 million (month) Jan 23 2015 1.59.1(2026-04-11 23:54:46 ago)
12,519 5 1143 GPL-3.0
Sep 04 2020 1.1 million (month) 3.5.5(2024-02-17 17:18:36 ago)

Playwright is a Node.js library that provides a high-level API to automate web browsers. It allows you to automate browser tasks such as generating screenshots, creating PDFs, and testing web pages by simulating user interactions. Playwright is similar to Puppeteer, but it supports more browsers and it also provide capabilities for automation of browser like Microsoft Edge and Safari.

Playwright is commonly used for web scraping, end-to-end testing, and browser automation.
Playwright is a spiritual successor to Puppeter and is available in more languages and has access to more browser types.

Undetected chromedriver is custom open source headless browser driver based on Selenium. It extends Selenium headless browsers to be more ressistant to fingeprinting and identification techniquest like: - Cloudflare - Datadome - Imperva And other similar WAF anti-bot systems.

Highlights


stealthseleniumheadless-browser

Example Use


```javascript const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch(); const context = await browser.newContext(); const page = await context.newPage(); await page.goto('https://www.example.com/form'); // fill in the form await page.fill('input[name="name"]', 'John Doe'); await page.fill('input[name="email"]', 'johndoe@example.com'); await page.selectOption('select[name="country"]', 'US'); // submit the form await page.click('button[type="submit"]'); // wait for the page to load after the form is submitted await page.waitForNavigation(); // take a screenshot await page.screenshot({path: 'form-submission.png'}); await browser.close(); })(); ```
```python # It works the same as Selenium just with a different import. import undetected_chromedriver as uc driver = uc.Chrome(headless=True, use_subprocess=False) driver.get('https://nowsecure.nl') driver.save_screenshot('screenshot.png') driver.close() ```

Alternatives / Similar


Was this page helpful?