Playwright (playwright v0.1.16-preview-2) 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()

Functions

Launch an instance of Playwright.Browser of the default client type (:chromium).

Launch an instance of Playwright.Browser given a client type.

Link to this section Types

Specs

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

The web client type used for launch and connect functions.

Specs

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

Link to this section Functions

Launch an instance of Playwright.Browser of the default client type (:chromium).

Specs

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

Launch an instance of Playwright.Browser given a client type.