Skip to content

[minor warning] passing an object to chromium.connectOverCDP deprecated in the "Quick start" example #1230

@ndrean

Description

@ndrean

In https://lightpanda.io/docs/quickstart/your-first-test, you pass directly the endpointURL value to chromium.connectOverCDP followed by an options object (eg headers).

// "use strict"  <-- redundant when you use ESM

import { lightpanda } from "@lightpanda/browser";
import { chromium } from "playwright-core";

const lpdopts = {
  host: "127.0.0.1",
  port: 9222,
};

const endpointURL = "ws://" + lpdopts.host + ":" + lpdopts.port;

(async () => {
  // Start Lightpanda browser in a separate process.
  const proc = await lightpanda.serve(lpdopts);

  // Connect using Playwright's chromium driver to the browser.
  const browser = await chromium.connectOverCDP(endpointURL, {}); // options 
   ...

Metadata

Metadata

Assignees

Labels

CDPChrome Debug Protocol

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions