Skip to main content

Playwright

We support Playwright's Chrome DevTools Protocol (CDP) connection method, which provides a reliable way to connect to BrowserCloud. This method is similar to how Puppeteer operates and is well-suited for most automation tasks. Playwright's Connect method is also supported, but more restrictive.

Once you have gotten your API key, you can connect Playwright to BrowserCloud.

Below are the examples of javascript and python scripts using BrowserCloud:

import { chromium } from "playwright-core";

// Connecting to Chrome locally
const browser = await chromium.launch();

// Connecting to Chrome via BrowserCloud
const browser = await chromium.connectOverCDP(
`wss://chrome-v2.browsercloud.io?token=${TOKEN}`
);

Time to scale out your playwright apps as well as to use APIs and helper functions right through BrowserCloud!