PlaywrightEx.BrowserType (PlaywrightEx v0.2.0)

View Source

Interact with a Playwright BrowserType.

There is no official documentation, since this is considered Playwright internal.

References:

Summary

Functions

Launches a new browser instance.

Types

guid()

@type guid() :: String.t()

launch_opt()

@type launch_opt() ::
  {:timeout, timeout()}
  | {:channel, binary()}
  | {:executable_path, binary()}
  | {:headless, boolean()}
  | {:slow_mo, integer() | float()}

Functions

launch(type_id, opts \\ [])

@spec launch(PlaywrightEx.guid(), [launch_opt() | PlaywrightEx.unknown_opt()]) ::
  {:ok, %{guid: PlaywrightEx.guid()}} | {:error, any()}

Launches a new browser instance.

Reference: https://playwright.dev/docs/api/class-browsertype#browser-type-launch

Options

  • :timeout (timeout/0) - Required. Maximum time for the operation (milliseconds).

  • :channel (String.t/0) - Browser distribution channel.

  • :executable_path (String.t/0) - Path to a browser executable to run instead of the bundled one.

  • :headless (boolean/0) - Whether to run browser in headless mode.

  • :slow_mo - Slows down Playwright operations by the specified amount of milliseconds.