Playwright (playwright v0.1.16-preview-3) View Source

Playwright module provides functions to launch a Playwright.Browser.

The following is a typical example of using Playwright to drive automation.

Example

alias Playwright.{Browser, Page, Response}

browser = Playwright.launch(:chromium)

assert Browser.new_page(browser)
|> Page.goto("http://example.com")
|> Response.ok()

Browser.close(browser)

Link to this section Summary

Types

The web client type used for launch and connect functions.

t()

%Playwright{}

Functions

Callback implementation for c:Playwright.ChannelOwner.init/2.

Launch an instance of Playwright.Browser.map()

Link to this section Types

Specs

client() :: :chromium | :firefox | :webkit

The web client type used for launch and connect functions.

Specs

t() :: %Playwright{
  chromium: term(),
  connection: term(),
  guid: term(),
  listeners: term(),
  parent: term(),
  type: term()
}

%Playwright{}

Link to this section Functions

Link to this function

init(owner, initializer)

View Source

Specs

init(struct(), map()) :: {atom(), struct()}

Callback implementation for c:Playwright.ChannelOwner.init/2.

Specs

launch(atom()) :: Playwright.Browser.t()

Launch an instance of Playwright.Browser.map()

Arguments

  • client: The type of client (browser) to launch. (:chromium | nil) with default :chromium