Playwright.BrowserType (playwright v0.1.16-preview-1) View Source

The Playwright.BrowserType module exposes functions that either:

  • launch a new browser instance via a Port
  • connect to a running playwright websocket

Examples

Open a new chromium via the CLI driver:

{connection, browser} = Playwright.BrowserType.launch()

Connect to a running playwright instances:

{connection, browser} = Playwright.BrowserType.connect("ws://localhost:3000/playwright")

Link to this section Summary

Functions

Connect to a running playwright server.

Launch a new local browser.

Link to this section Types

Specs

t() :: %Playwright.BrowserType{
  connection: term(),
  guid: term(),
  initializer: term(),
  listeners: term(),
  parent: term(),
  type: term()
}

Link to this section Functions

Specs

connect(binary()) :: {pid(), Playwright.Browser.t()}

Connect to a running playwright server.

Specs

launch() :: {pid(), Playwright.Browser.t()}

Launch a new local browser.