1

Get your Secret Key

First, sign up on our Platform and get your Secret Key.

2

Get your Raccoon Passcode(Optional)

Passing Raccoon Passcode is optional and is good to have to identify end user for which this request is being made for.
Get your Raccoon Passcode.

We recommend using Tail SDK to link and manage your end user accounts of different third party apps securely, it uses this passcode to inject user’s authentication context into the app if available in Fleet Sessions.

3

Install Raccoon AI SDK

npm i raccoonai
4

Make your first request

import { RaccoonAI } from 'raccoonai'

const client = new RaccoonAI({secretKey: process.env.RACCOON_SECRET_KEY});
(async () => {
    const session = await client.fleet.create({})
    console.log('Websocket Url:', session.websocket_url);
})()
5

Install Playwright

npm i playwright
6

Use the websocket_url to connect playwright to the remote browser in your existing code or example below

import { chromium } from 'playwright'

(async () => {
    const browser = await chromium.connectOverCDP(<websocket_url>)
    const context = browser.contexts()[0]
    const page = context.pages()[0]

    await page.goto('https://flyingraccoon.tech')
    await page.screenshot({ path: 'test_screenshot.png' })
})();

7

Observe the session

Checkout the session live stream and recording Fleet page on the Platform or on the livestream_url returned in the response.

Next Steps

Was this page helpful?