TabSailTabSail
Integrations

Puppeteer

Connect Puppeteer to the existing remote browser.

Validated with puppeteer-core 25.15.0: navigation, screenshots, PDF, remote uploads, downloads, multiple tabs, reconnect, human handoff, and Profile login reuse. Other versions require application testing.

Install the SDK artifact from Quickstart, then:

pnpm add puppeteer-core@25.15.0
import puppeteer from 'puppeteer-core';
import { TabSail } from 'tabsail';

const client = new TabSail();
await client.withSession({}, async (session) => {
  const grant = await client.sessions.connections.create(session.id);
  const browser = await puppeteer.connect({
    browserWSEndpoint: grant.url,
    defaultViewport: null,
    downloadBehavior: { policy: 'allow', downloadPath: session.downloadDirectory! },
  });
  try {
    const page = (await browser.pages())[0] ?? await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title()); // Example Domain
  } finally {
    await browser.disconnect();
  }
});

Reuse the existing browser context. disconnect() leaves the browser running; the SDK scope closes the session and waits for release. Download paths belong to the remote browser; retrieve completed files through the Files API.

After human handoff, obtain a fresh CDP grant and reconnect. Inspect the current page before continuing. See the Snipe-IT report example.