Kickstart with PlayWright Node.js Template

Clone this GitHub repo to use Emereg with PlayWright in Node.

Setup your development

  1. Get your API Key

Go over to https://emereg.com/api_tokens and create a new API token.

  1. Spin up a browser session via the Sessions API

  2. Connect to the browser using the browser_id

import { chromium } from 'playwright-core'; // npm i playwright-core

const endpointURL = `wss://browser.emereg.com/devtools/browser/${browser_id}`
const browser = await chromium.connectOverCDP(endpointURL);

const contexts = browser.contexts()
const pages = contexts[0].pages()
let page = pages[0]

await page.goto('https://emereg.com')