setup(): Promise<Connections>
Launches a Playwright browser (or reuses an existing one), starts the web server, and returns the page/server/browser connection object.
import * as Browser from './browser.ts'; import type { Config } from '../types.ts'; // Defined, not invoked: starts a real server, browser and page. async function example(config: Config) { const { page } = await Browser.setup(config); // server is bound, console/pageerror wired return page.goto(`http://localhost:${config.port}`); }
config: Config
Promise<Connections>