API Reference playwright v1.18.0-alpha.1

Modules

Playwright module provides functions to launch a Playwright.Browser.

This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the server to your e2e test.

A Playwright.Browser instance is createed via

Playwright.BrowserContext provides a way to operate multiple independent browser sessions.

Playwright.BrowserType provides functions to launch a specific browser instance or connect to an existing one.

A wrapper to the Playwright Javascript CLI

Provides storage and management of ChannelOwner instances.

Configuration for Playwright.

Playwright.ConsoleMessage instances are dispatched by page and handled via Playwright.Page.on/3 for the :console event type.

ElementHandle represents an in-page DOM element.

At any point of time, Playwright.Page exposes its current frame tree via the Playwright.Page.main_frame/1 and Playwright.Frame.child_frames/1 functions.

Playwright.JSHandle represents an in-page JavaScript object. JSHandles can be created with Playwright.Page.evaluate_handle/3.

Playwright.Locator represents a view to the element(s) on the page. It captures the logic sufficient to retrieve the element at any given moment. Locator can be created with the Playwright.Locator.new/2 function.

Page provides methods to interact with a single tab in a Playwright.Browser, or an extension background page in Chromium.

Playwright.Page.Accessibility provides functions for inspecting Chromium's accessibility tree.

Playwright.Request represents a request for a network resource.

Use PlaywrightTest.Case in an ExUnit test module to start a Playwright server and put it into the test context.

Mix Tasks

Installs Playwright browsers.

Installs playwright deps.