BrowserBuilder
Playwright\Browser\BrowserBuilder
Methods
__construct()
function __construct( private readonly string $browserType, private readonly TransportInterface $transport, private readonly LoggerInterface $logger, private readonly PlaywrightConfig $config, )
withHeadless()
selffunction withHeadless(bool $headless = true): self
withSlowMo()
selffunction withSlowMo(int $milliseconds): self
withChannel()
selffunction withChannel(string $channel): self
withProxy()
selffunction withProxy(array $proxy): self
withDownloadsPath()
selffunction withDownloadsPath(string $path): self
withArgs()
selffunction withArgs(array $args): self
withInspector()
selffunction withInspector(): self
launch()
BrowserInterfacefunction launch(): BrowserInterface
connect()
BrowserInterfaceAttaches Playwright to an existing BrowserServer via WebSocket endpoint.
function connect(string $wsEndpoint, array $options = []): BrowserInterface
connectOverCDP()
BrowserInterfaceAttaches Playwright over CDP (Chromium only).
function connectOverCDP(string $endpointURL, array $options = []): BrowserInterface