NOTE: This package tracks Playwright v1.58.x. While not yet at full parity with the official Playwright API, significant coverage has been achieved across Page, Frame, Locator, Browser, BrowserContext, Request, Response, Route, ElementHandle, JSHandle, Worker, Mouse, Keyboard, Touchscreen, Download, FileChooser, Video, WebSocket, Tracing, Selectors, Coverage, Clock, and more.
Playwright is an Elixir library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast. See how Playwright is better.
The package can be installed by adding playwright to your list of dependencies in mix.exs:
def deps do
[
{:playwright, "~> 1.58.2-alpha.1"}
]
enddefmodule Test.ExampleTest do
use ExUnit.Case, async: true
use PlaywrightTest.Case
describe "Navigating to playwright.dev" do
test "works", %{browser: browser} do
page = Playwright.Browser.new_page(browser)
Playwright.Page.goto(page, "https://playwright.dev")
text = Playwright.Page.text_content(page, ".navbar__title")
assert text == "Playwright"
Playwright.Page.close(page)
end
end
endThis project aims to track the release versioning found in Playwright proper.
- Clone the repo
- Run
bin/dev/doctorand for each problem, either use the suggested remedies or fix it some other way - Run
bin/dev/testto run the test suite make sure everything is working
- Get latest code:
bin/dev/update - Run tests:
bin/dev/test - Start server:
bin/dev/start - Run tests and push:
bin/dev/shipit
- Update the version in
mix.exsa. Search for and update the version anywhere it appears in the repo, such as this README git tag -a v${version_number}such that the tag look likev1.44.0-alpha.3orv1.44.0git push --tagsmix hex.publish