# Playwright v1.65.0-rc.3 - Table of Contents > Elixir client for Playwright: a port of the official JavaScript client. ## GUIDES - Introduction - [Overview](readme.md) - [Getting started](getting-started.md) - [What's ported](whats-ported.md) - [From playwright.dev to Elixir](api-conventions.md) - [Cheatsheet](cheatsheet.md) - Guides - [Testing with ExUnit](testing-with-exunit.md) - [Options, devices and projects](test-options.md) - [Artifacts, retries and workers](test-artifacts.md) - [Porting Playwright Test specs](porting-playwright-test.md) - [Events and waiting](events-and-waiting.md) - [Network](network.md) - [Debugging and CI](debugging-and-ci.md) - [Concurrency](concurrency.md) - Changelog - [Changelog](changelog.md) ## Modules - Core - [Playwright](Playwright.md): Elixir client for Playwright, ported 1:1 from the official JavaScript client. - [Playwright.AbortController](Playwright.AbortController.md): The DOM `AbortController`: aborts the calls given its `signal/1` as `signal:` option. - [Playwright.AbortSignal](Playwright.AbortSignal.md): The DOM `AbortSignal` of the `signal:` options, from a `Playwright.AbortController` - [Playwright.Browser](Playwright.Browser.md): A Browser is created via `Playwright.BrowserType.launch/2`. An example of using a [`Browser`](`Playwright.Browser`) to create a [`Page`](`Playwright.Page`) - [Playwright.BrowserContext](Playwright.BrowserContext.md): BrowserContexts provide a way to operate multiple independent browser sessions. - [Playwright.BrowserType](Playwright.BrowserType.md): BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is a typical example of using Playwright to drive automation - [Playwright.Clock](Playwright.Clock.md): Accurately simulating time-dependent behavior is essential for verifying the correctness of applications. Learn more about [clock emulation](https://playwright.dev/docs/clock). - [Playwright.Credentials](Playwright.Credentials.md): [`Credentials`](`Playwright.Credentials`) is a virtual WebAuthn authenticator scoped to a [`BrowserContext`](`Playwright.BrowserContext`). It lets tests register passkeys and answer `navigator.credentials.create()` / `navigator.credentials.get()` ceremonies in the page, without a real authenticator or hardware security key. - [Playwright.Disposable](Playwright.Disposable.md): [`Disposable`](`Playwright.Disposable`) is returned from various methods to allow undoing the corresponding action. For example, `Playwright.Page.add_init_script/4` returns a [`Disposable`](`Playwright.Disposable`) that can be used to remove the init script. - [Playwright.Driver](Playwright.Driver.md): Installs and locates the Playwright driver: a pinned `playwright-core` npm package plus the pinned Node.js binary for the host platform. No Node.js is needed beforehand. - [Playwright.Promise](Playwright.Promise.md): A pending result, as returned by the waits that JS starts without `await` (`Playwright.Page.wait_for_event/3`, `wait_for_request/3`, `wait_for_navigation/2`, ...) - [Playwright.RegExp](Playwright.RegExp.md): A JS `RegExp`, for patterns Elixir's `Regex` cannot express - [Playwright.Selectors](Playwright.Selectors.md): Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/docs/extensibility) for more information. - [Playwright.Supervisor](Playwright.Supervisor.md): Runs one Playwright driver and its connection. - Pages - [Playwright.ConsoleMessage](Playwright.ConsoleMessage.md): [`ConsoleMessage`](`Playwright.ConsoleMessage`) objects are dispatched by page via the [`Page.on(:console)`](Playwright.Page.html#module-console) event. For each console message logged in the page there will be corresponding event in the Playwright context. - [Playwright.Dialog](Playwright.Dialog.md): [`Dialog`](`Playwright.Dialog`) objects are dispatched by page via the [`Page.on(:dialog)`](Playwright.Page.html#module-dialog) event. - [Playwright.Download](Playwright.Download.md): [`Download`](`Playwright.Download`) objects are dispatched by page via the [`Page.on(:download)`](Playwright.Page.html#module-download) event. - [Playwright.ElementHandle](Playwright.ElementHandle.md): * extends: [`JSHandle`](`Playwright.JSHandle`) - [Playwright.FileChooser](Playwright.FileChooser.md): [`FileChooser`](`Playwright.FileChooser`) objects are dispatched by the page in the [`Page.on(:file_chooser)`](Playwright.Page.html#module-file_chooser) event. - [Playwright.Frame](Playwright.Frame.md): At every point of time, page exposes its current frame tree via the `Playwright.Page.main_frame/1` and `Playwright.Frame.child_frames/1` methods. - [Playwright.FrameLocator](Playwright.FrameLocator.md): FrameLocator represents a view to the `iframe` on the page. It captures the logic sufficient to retrieve the `iframe` and locate elements in that iframe. FrameLocator can be created with either `Playwright.Locator.content_frame/1`, `Playwright.Page.frame_locator/2` or `Playwright.Locator.frame_locator/2` method. - [Playwright.JSHandle](Playwright.JSHandle.md): JSHandle represents an in-page JavaScript object. JSHandles can be created with the `Playwright.Page.evaluate_handle/4` method. - [Playwright.Keyboard](Playwright.Keyboard.md): Keyboard provides an api for managing a virtual keyboard. The high level api is `Playwright.Keyboard.type/3`, which takes raw characters and generates proper `keydown`, `keypress`/`input`, and `keyup` events on your page. - [Playwright.Locator](Playwright.Locator.md): Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a way to find element(s) on the page at any moment. A locator can be created with the `Playwright.Page.locator/3` method. - [Playwright.Mouse](Playwright.Mouse.md): The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. - [Playwright.Page](Playwright.Page.md): Page provides methods to interact with a single tab in a [`Browser`](`Playwright.Browser`), or an [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One [`Browser`](`Playwright.Browser`) instance might have multiple [`Page`](`Playwright.Page`) instances. - [Playwright.Touchscreen](Playwright.Touchscreen.md): The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the touchscreen can only be used in browser contexts that have been initialized with `:has_touch` set to true. - [Playwright.WebError](Playwright.WebError.md): [`WebError`](`Playwright.WebError`) class represents an unhandled exception thrown in the page. It is dispatched via the [`BrowserContext.on(:web_error)`](Playwright.BrowserContext.html#module-web_error) event. - [Playwright.WebMCP](Playwright.WebMCP.md): [`WebMCP`](`Playwright.WebMCP`) exposes the tools that a frame registers through the experimental [`WebMCP`](`Playwright.WebMCP`) browser API, `navigator.modelContext`. It lists the tools and calls them. - [Playwright.WebStorage](Playwright.WebStorage.md): WebStorage exposes the page's `localStorage` or `sessionStorage` for the current origin via a [browser-consistent](https://developer.mozilla.org/en-US/docs/Web/API/Storage) API. - [Playwright.Worker](Playwright.Worker.md): The Worker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). `worker` event is emitted on the page object to signal a worker creation. `close` event is emitted on the worker object when the worker is gone. - Assertions - [Playwright.Expect](Playwright.Expect.md): Web-first assertions: the methods of [`LocatorAssertions`](https://playwright.dev/docs/api/class-locatorassertions), [`PageAssertions`](https://playwright.dev/docs/api/class-pageassertions) and [`APIResponseAssertions`](https://playwright.dev/docs/api/class-apiresponseassertions), as functions of their receiver. - [Playwright.ExpectError](Playwright.ExpectError.md): A failed matcher (`Playwright.Expect`). - Testing - [Playwright.Case](Playwright.Case.md): A case template with Playwright Test's default fixtures: the module holds a `browser` (`Playwright.Test.BrowserPool.browser/1` in `setup_all`, upstream's worker for the file) and its `browser_name` (upstream's `browserName`, the name the browser was launched with: `:chromium`, `:firefox` or `:webkit`; it replaces a parameter of that name), for the module's `setup_all` and its tests, and each test gets a `context` of it and a `page`, recorded as the `:test` config and the test's tags say (see `Playwright.Test`). A plain tag of that name (`@tag browser_name: _`, `@moduletag`) would replace it in the test's context, as ExUnit merges tags over it: don't name your own tags `browser_name`. - [Playwright.Test](Playwright.Test.md): Playwright Test's per-test machinery on ExUnit: each test's result, its artifacts (traces, screenshots, videos, `error-context.md`), Playwright Test's context defaults, soft errors, snapshot and output paths, and steps. The browser comes from `Playwright.Test.BrowserPool`, contexts and pages from the plain API; `Playwright.Case` puts them together. - [Playwright.Test.Assertions](Playwright.Test.Assertions.md): ExUnit's `assert/1,2` and `refute/1,2`, each also recorded as an `expect` step of the running test, as upstream's `expect(value).toBe(...)` is (`Expect "assert"`). Elixir only: upstream's assertions are its matchers. - [Playwright.Test.BrowserPool](Playwright.Test.BrowserPool.md): Browsers for tests, on drivers the pool starts and stops after the suite: Playwright Test's worker-scoped `browser` and `playwright` fixtures, and its worker model. Contexts and pages come from the plain API (`Playwright.Browser.new_context!/2`, `Playwright.BrowserContext.new_page!/1`), and a test of `use Playwright.Test` records the contexts it creates on a pooled browser and gives them Playwright Test's defaults. - [Playwright.Test.GitHubFormatter](Playwright.Test.GitHubFormatter.md): Playwright Test's `github` reporter as an ExUnit formatter: GitHub Actions annotations for failed tests, errors outside a test, slow test files and the run's summary. It prints only workflow commands, so it runs next to `ExUnit.CLIFormatter`, on CI, as upstream's documented `reporter: process.env.CI ? 'github' : 'list'` - [Playwright.Test.Project](Playwright.Test.Project.md): A project of `Playwright.Test.parameters/1`, upstream's `projects: [{ name, use }]` entry: its `name` and its `use` options, validated. It is the value of one private parameter, and inspects as its `title/1`, so a failed test prints a short name, as upstream's reporters print the project's: `Parameters: %{"playwright.project": #Playwright.Test.Project<"Mobile Safari">}`. An unnamed project, as upstream's, has no title: it inspects as its options. - Network - [Playwright.APIRequest](Playwright.APIRequest.md): Exposes API that can be used for the Web API testing. This class is used for creating [`APIRequestContext`](`Playwright.APIRequestContext`) instance which in turn can be used for sending web requests. An instance of this class can be obtained via `Playwright.request/1`. For more information see [`APIRequestContext`](`Playwright.APIRequestContext`). - [Playwright.APIRequestContext](Playwright.APIRequestContext.md): This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test. - [Playwright.APIResponse](Playwright.APIResponse.md): [`APIResponse`](`Playwright.APIResponse`) class represents responses returned by `Playwright.APIRequestContext.get/3` and similar methods. - [Playwright.Request](Playwright.Request.md): Whenever the page sends a request for a network resource the following sequence of events are emitted by [`Page`](`Playwright.Page`) - [Playwright.Response](Playwright.Response.md): [`Response`](`Playwright.Response`) class represents responses which are received by page. - [Playwright.Route](Playwright.Route.md): Whenever a network route is set up with `Playwright.Page.route/4` or `Playwright.BrowserContext.route/4`, the [`Route`](`Playwright.Route`) object allows to handle the route. - [Playwright.WebSocket](Playwright.WebSocket.md): The [`WebSocket`](`Playwright.WebSocket`) class represents WebSocket connections within a page. It provides the ability to inspect and manipulate the data being transmitted and received. - [Playwright.WebSocketRoute](Playwright.WebSocketRoute.md): Whenever a [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) route is set up with `Playwright.Page.route_web_socket/3` or `Playwright.BrowserContext.route_web_socket/3`, the [`WebSocketRoute`](`Playwright.WebSocketRoute`) object allows to handle the WebSocket, like an actual server would do. - Artifacts and debugging - [Playwright.CDPSession](Playwright.CDPSession.md): The [`CDPSession`](`Playwright.CDPSession`) instances are used to talk raw Chrome Devtools Protocol - [Playwright.Coverage](Playwright.Coverage.md): Coverage gathers information about parts of JavaScript and CSS that were used by the page. - [Playwright.Debugger](Playwright.Debugger.md): API for controlling the Playwright debugger. The debugger allows pausing script execution and inspecting the page. Obtain the debugger instance via `Playwright.BrowserContext.debugger/1`. - [Playwright.Screencast](Playwright.Screencast.md): Interface for capturing screencast frames from a page. - [Playwright.Tracing](Playwright.Tracing.md): API for collecting and saving Playwright traces. Playwright traces can be opened in [Trace Viewer](https://playwright.dev/docs/trace-viewer) after Playwright script runs. - [Playwright.Video](Playwright.Video.md): When browser context is created with the `:record_video` option, each page has a video object associated with it. - Errors - [Playwright.AbortError](Playwright.AbortError.md): A call was cancelled through its `signal:` (`Playwright.AbortController`). - [Playwright.AggregateError](Playwright.AggregateError.md): Every promise of `Playwright.Promise.any/1` was rejected. As JS's `AggregateError`, `errors` lists the rejections in input order (`[]` for `any([])`). `Playwright.Promise.await/1` returns it when each of them is a `t:Playwright.error/0`, and raises it otherwise. - [Playwright.PlaywrightError](Playwright.PlaywrightError.md): A Playwright error other than a timeout, closed target or abort. - [Playwright.TargetClosedError](Playwright.TargetClosedError.md): The page, context or browser of a call has been closed, or the driver has exited. - [Playwright.TimeoutError](Playwright.TimeoutError.md): A call ran out of time. ## Mix Tasks - [mix playwright.cli](Mix.Tasks.Playwright.Cli.md): Usage: `mix playwright.cli ARGS...` - [mix playwright.install](Mix.Tasks.Playwright.Install.md): Usage: `mix playwright.install [ARGS...]` (browsers and flags, in any order)