Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
fb13fff
Update language versions
coreyti May 20, 2024
f46314d
Fix link to Readme on hex.pm
octosteve May 24, 2024
207c8d1
Update keyboard.ex w/ placeholders
coreyti May 24, 2024
45efdcd
Update coverage.ex w/ placeholders
coreyti May 24, 2024
59b3c09
Update download.ex w/ placeholders
coreyti May 24, 2024
a1a7d76
Update coverage.ex w/ placeholders
coreyti May 24, 2024
828b570
Update file_chooser.ex w/ placeholders
coreyti May 24, 2024
366b07f
Update mouse.ex w/ placeholders
coreyti May 24, 2024
b7961cb
Update touchscreen.ex w/ placeholders
coreyti May 24, 2024
f56d3b4
Update video.ex w/ placeholders
coreyti May 24, 2024
49f592c
Update keyboard.ex w/ placeholders
coreyti May 24, 2024
13ee534
Update mouse.ex w/ placeholders
coreyti May 24, 2024
1132909
Update api_request.ex w/ placeholders
coreyti May 25, 2024
e13ebff
Update api_request_context.ex w/ placeholders
coreyti May 25, 2024
868ca56
Update api_request_context.ex w/ placeholders
coreyti May 25, 2024
bebeba9
Update api_request_context.ex w/
coreyti May 25, 2024
ce43ebb
Update api_response.ex w/ placeholders
coreyti May 25, 2024
f727deb
Update browser.ex w/ placeholders
coreyti May 25, 2024
d0757ad
Update browser_context.ex w/ placeholders
coreyti May 25, 2024
dfac752
Update console_message.ex w/ placeholders
coreyti May 25, 2024
e6af550
Update dialog.ex w/ placeholders
coreyti May 25, 2024
d6926fb
Update element_handle.ex w/ placeholders
coreyti May 25, 2024
1a95751
Update frame.ex w/ placeholders
coreyti May 25, 2024
01e2e12
Update fetch_request.ex (comment: "obsolete?")
coreyti May 25, 2024
faa5105
Update js_handle.ex w/ placeholders
coreyti May 25, 2024
33fb266
Update local_utils.ex (obsolete?)
coreyti May 25, 2024
5898741
Update locator.ex w/ placeholders
coreyti May 25, 2024
7732d90
[Fixed] `Logger.warn` -> `Logger.warning`
coreyti May 20, 2024
cdfdffa
Update page.ex w/ placeholders
coreyti May 25, 2024
1707ed6
Update request.ex w/ placeholders
coreyti May 25, 2024
a6293a2
Update response.ex w/ placeholders
coreyti May 25, 2024
31a7a8e
Update route.ex w/ placeholders
coreyti May 25, 2024
842a104
Update selectors.ex w/ placeholders
coreyti May 25, 2024
a67669e
Add frame_locator.ex w/ placeholders
coreyti May 25, 2024
fc9b18b
Update tracing.ex w/ placeholders
coreyti May 25, 2024
1796dbc
Updagte websocket.ex w/ placeholders
coreyti May 25, 2024
5f10ddd
Update worker.ex w/ placeholders
coreyti May 25, 2024
15b68bd
[Changed] start w/ playwright-core at v1.18.1
coreyti May 25, 2024
c298848
[Changed] bump playwright-core to v1.19.0
coreyti May 25, 2024
f1b48ed
[Changed] bump playwright-core to v1.20.0
coreyti May 25, 2024
c5e00ca
[Changed] bump playwright-core to v1.21.0
coreyti May 25, 2024
75ca070
[Changed] bump playwright-core to v1.22.0
coreyti May 25, 2024
180b468
[Changed] bump playwright-core to v1.23.0
coreyti May 25, 2024
2172e3f
[Changed] bump playwright-core to v1.24.0
coreyti May 25, 2024
b12702c
[Changed] bump playwright-core to v1.25.0
coreyti May 25, 2024
1f66f9d
[Changed] bump playwright-core to v1.26.0
coreyti May 26, 2024
39d2d9c
[Changed] bump playwright-core to v1.27.0
coreyti May 26, 2024
8effc82
[Changed] bump playwright-core to v1.28.0
coreyti May 26, 2024
2d9d19a
[Changed] bump playwright-core to v1.29.0
coreyti May 26, 2024
f821651
[Changed] bump playwright-core to v1.30.0
coreyti May 26, 2024
139574d
[Changed] bump playwright-core to v1.31.0
coreyti May 28, 2024
bf695e2
[Changed] bump playwright-core to v1.32.0
coreyti May 28, 2024
af4a527
[Changed] bump playwright-core to v1.33.0
coreyti May 28, 2024
031b430
[Changed] API/SDK rebuild (2/n)
coreyti May 20, 2024
347b37e
[Changed] API/SDK rebuild (3/n)
coreyti May 20, 2024
353c96c
[Changed] API/SDK rebuild (3/n)
coreyti May 20, 2024
536c6cf
[Changed] API/SDK rebuild (4/n)
coreyti May 20, 2024
2823796
[Changed] API/SDK rebuild (5/n)
coreyti May 20, 2024
07b49fd
[Changed] API/SDK rebuild (6/n)
coreyti May 20, 2024
6980d09
[Changed] API/SDK rebuild (7/n)
coreyti May 20, 2024
c1432e0
[Changed] API/SDK rebuild (8/n)
coreyti May 20, 2024
d5ec2c3
[Changed] API/SDK rebuild (9/n)
coreyti May 20, 2024
8bd0227
[Fixed] file rename to avoid warning
coreyti May 20, 2024
7061505
[Fixed] Update Elixir packages
coreyti May 20, 2024
400405f
[Changed] Upgrade NodeJS and NPM packages
coreyti May 20, 2024
6b0d008
[Changed] Lay groundwork for driver.js improvements
coreyti May 21, 2024
03707e3
[Changed] Bump playwright dep to v1.38.0
coreyti May 22, 2024
5ed756e
[Fixed] Rename: `unit_test.ex{s,}`
coreyti May 22, 2024
9f5381a
[Changed] Hygiene: clean up `alias` usage
coreyti May 22, 2024
ed3e4b8
[Fix] Update transport implementation to match Server API
coreyti May 23, 2024
1751810
[Changed] Bump playwright-core to v1.44.0
coreyti May 23, 2024
d648eff
[Fixed] Resolves a number of test issues
coreyti May 23, 2024
8e8d713
[Fixed] Mark `Page.Accessibility.snapshot/2` as `@deprecated`
coreyti May 24, 2024
87f6346
[Changed] Bump package version to v1.44.0-alpha.1
coreyti May 25, 2024
fab2462
[Changed] Roll back playwright-core to v1.33.0
coreyti May 30, 2024
64acd62
check: v1.34.0 w/ :skip of console
coreyti May 29, 2024
276201b
check: v1.35.0 w/ :skip of route
coreyti May 29, 2024
8d64b8c
check: v1.36.0 - no change
coreyti May 29, 2024
0d9bf1c
check: v1.37.0 - no change
coreyti May 29, 2024
2478157
check: v1.38.0 - major changes to assets.build
coreyti May 29, 2024
68a9fdc
check: v1.38.0 - fixes for build & install changes
coreyti May 30, 2024
5b5bafb
check: v1.39.0 - no change
coreyti May 30, 2024
0e64952
check: v1.40.0 w/ :skip of `Locator.set_input_files`
coreyti May 30, 2024
be7d136
check: v1.41.0 - no change
coreyti May 30, 2024
9d376b4
check: v1.42.0 - BIG (temp?) changes
coreyti May 31, 2024
741301e
check: v1.43.0 - no change
coreyti May 31, 2024
650afad
check: v1.44.0 - no change
coreyti May 31, 2024
2c3309c
Implement basic versions of Page.Keyboard
germsvel May 30, 2024
d5787dc
Adjust `Keyboard` to `use ...ChannelOwner`
coreyti May 31, 2024
225a143
Tidy: alpha-sort & group functions
coreyti May 31, 2024
e9aea69
Tidy/fix: Remove `keyboard.html` test asset
coreyti May 31, 2024
f4b4be0
Fix: Remove `npm install` from CI build
coreyti May 31, 2024
5d7274d
Fix: Add browser install step to CI
coreyti May 31, 2024
bb2613c
Fix: `mix playwright.install` also installs deps
coreyti May 31, 2024
5b2171a
Fix: bump test timeouts: 200ms -> 500ms
coreyti May 31, 2024
c9be743
Merge pull request #52 from mechanical-orchard/implement-keyboard
coreyti May 31, 2024
1a3b693
Merge pull request #51 from octosteve/patch-1
coreyti May 31, 2024
9cb0241
SDK: add `ChannelOwner.post!/3`
coreyti May 31, 2024
25865c5
Tidy: alpha-sort Keyboard tests
coreyti May 31, 2024
164d63f
Remove proof-of-concept implementations
coreyti May 31, 2024
7731d2a
Fix `BrowserType.connect/2` to provide correction options to `WebSock…
coreyti May 31, 2024
cea7272
API: fix specs for `Keyboard`
coreyti May 31, 2024
fa1a8b3
Minor cleanup of docs and advertised version
coreyti May 31, 2024
00aa995
Docs: improve structure
coreyti May 31, 2024
fbf51da
Restructure: move API tests into test/api
coreyti May 31, 2024
914cfeb
Fix: resolve changes in v1.34.0 affecting `Page.on("console")`
coreyti Jun 1, 2024
05b546a
Fix: ensure that `BrowserContext.close/1` is idempotent
coreyti Jun 2, 2024
330b74e
Fix: remove `chromium` from default `ws_endpoint`
coreyti Jun 2, 2024
d1a03a3
Fix: correct the message method for `Locator.set_input_files`
coreyti Jun 2, 2024
c27488f
Fix: add lingering changes related to console/route fixes
coreyti Jun 2, 2024
81cade4
Fix make `Page.close` idempotent
coreyti Jun 2, 2024
0160922
Fix: `Browser.close` should be idempotent
coreyti Jun 2, 2024
0a0fa15
API: add start of `@moduledoc` for `Keyboard`
coreyti Jun 4, 2024
2a8917c
Fix: update repo/license with correct org
coreyti Jun 21, 2024
2973bde
v1.44.0-alpha.2
coreyti Jun 21, 2024
1caf48d
Update getting-started.md
kimihito Jul 30, 2024
7040f1d
Merge pull request #54 from kimihito/patch-1
coreyti Aug 2, 2024
82fcdbf
Fix: `Playwright.launch/2` returns an ok tuple
coreyti Aug 2, 2024
ef07a21
Fix: make `Locator.wait_for` timeout safe
coreyti Aug 3, 2024
a6748bc
Merge pull request #56 from mechanical-orchard/issue-55--locator.wait…
coreyti Aug 5, 2024
faa13fe
v1.44.0-alpha.3
coreyti Aug 5, 2024
b88899e
Doc: use `@doc deprecated` for `Accessibility.snapshot/2`
coreyti Aug 6, 2024
15f5dc7
Fix: switch to latest GitHub Action for BEAM
coreyti Aug 8, 2024
7c8c3e6
Add: `Locator.all/1`
coreyti Aug 8, 2024
0c042f4
Doc: improve module/test docs for some `Locator` functions
coreyti Aug 8, 2024
dafafad
Add `Page.expose_binding/4` and `.expose_function/3`
coreyti Aug 9, 2024
05abe1d
Add `Locator.blur/2`
coreyti Aug 9, 2024
aad4161
Add `Locator.clear/2`
coreyti Aug 9, 2024
f5a8b93
Add `Locator.drag_to/3`
coreyti Aug 9, 2024
819d18e
Increase the error-handling timeout adjustment
ry4n1m3 Aug 12, 2024
be98b71
Ignore Jetbrains config files
Aug 12, 2024
7b7869b
Doc: deprecation notices and whitespace cleanup
coreyti Aug 9, 2024
c5e9d8d
Adds Page, Frame, and Locator get_by_text/3 functions
ry4n1m3 Aug 12, 2024
ce3fc38
Make `Locator.get_by_text_selector/2` private
coreyti Aug 13, 2024
b488440
Make `Locator.get_by_text_selector/2` public
coreyti Aug 13, 2024
f204497
Adds Releasing guide to README
ry4n1m3 Aug 13, 2024
04b0b51
Adds function docs for get_by_text
ry4n1m3 Aug 19, 2024
778e0f4
Bump to 1.44.0-alpha.4
Aug 19, 2024
bdda4ee
Fixes Locator.wait_for support for waiting for hidden state elements
ry4n1m3 Aug 20, 2024
8a00f17
Fix typo
mfeckie Aug 30, 2024
5ae1f72
Add test for `.content`
mfeckie Aug 30, 2024
23920e8
Add support for `.content` to Page and Frame
mfeckie Aug 30, 2024
bf7a47a
Update spec
mfeckie Aug 30, 2024
ba27dea
Merge pull request #61 from mfeckie/support-page-content
coreyti Sep 26, 2024
5d09adf
Add test showing user agent can be set
mfeckie Aug 31, 2024
b717839
Show other ways of setting userAgent
mfeckie Aug 31, 2024
b2a03a6
Document setting user agent
mfeckie Aug 31, 2024
37a9833
Update README with release/version notes
coreyti Sep 26, 2024
b5f9c63
Merge branch 'main' of github.com:mechanical-orchard/playwright-elixir
roznawsk Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 4 additions & 6 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/env bash

source_up
export PROJECT="$(expand_path .)"
source_up_if_exists
export REPO="$(expand_path .)"
export ERL_AFLAGS="-kernel shell_history enabled" # persistent iex history

# default: true
# export PLAYWRIGHT_HEADLESS=false

# default: driver
# default transport: driver (websocket is the one alternative)
# export PLAYWRIGHT_TRANSPORT=websocket

# default: ws://localhost:3000/playwright
# export PLAYWRIGHT_ENDPOINT="ws://localhost:3000/chromium"
# export PLAYWRIGHT_ENDPOINT="ws://localhost:3000/"

# put your custom/local overrides in here:
source_env_if_exists .local/envrc
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
uses: erlef/setup-beam@v1
with:
elixir-version: '1.12.0'
otp-version: '24.0.1'
elixir-version: '1.16.2'
otp-version: '26.2.5'
- name: Install Elixir dependencies
run: mix deps.get
- name: Install Node dependencies
run: npm install --prefix assets
- name: Install Playwright dependencies (e.g., browsers)
run: mix playwright.install
# NOTE: not needed for now, while assets are
# directly installed to `priv/static`.
# - name: Install Node dependencies
# run: npm install --prefix assets
- name: Run tests
run: mix test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ playwright-*.tar
.medic/skipped/
.doctor.out
.vscode
*.iml
/.idea/
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.14.4-otp-25
erlang 25.3
nodejs 19.8.1
elixir 1.16.2-otp-26
erlang 26.2.5
nodejs 22.2.0
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed

- **BREAKING:** **(WIP/UNSTABLE)** - Substantial API/usage changes are underway. e.g.:
- We intend to restore the use of tagged-tuple results (`{:ok, _}` and `{:error, _}`) throughout the code base, internally as well as for the "API".
- Bulk Package renaming.
- ...

---

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 geometerio
Copyright (c) 2024 Mechanical Orchard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Playwright for Elixir

**NOTE:** This package is currently in "preview". The features are not yet at parity with other Playwright implementations. Once `playwright-elixir` is at or near parity with [`playwright`](https://github.com/microsoft/playwright), the version number will be updated to mirror the supported version of `playwright`.
**NOTE:** This package is currently in "preview" (or "alpha"). The features are not yet at parity with other Playwright implementations. Once `playwright-elixir` is at or near parity with [`playwright`](https://github.com/microsoft/playwright), the version number will be updated to mirror the supported version of `playwright`.

## Overview

[Playwright](https://github.com/geometerio/playwright-elixir) 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](https://playwright.dev/docs/why-playwright).
[Playwright](https://github.com/mechanical-orchard/playwright-elixir) 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](https://playwright.dev/docs/why-playwright).

## Installation

Expand All @@ -13,14 +13,14 @@ The package can be installed by adding `playwright` to your list of dependencies
```elixir
def deps do
[
{:playwright, "~> 1.18.0-alpha.1"}
{:playwright, "~> 1.44.0-alpha.4"}
]
end
```

## Usage

- [README](https://hexdocs.pm/playwright/README.html)
- [README](https://hexdocs.pm/playwright/readme.html)
- [Getting started](https://hexdocs.pm/playwright/basics-getting-started.html)
- [API Reference](https://hexdocs.pm/playwright/api-reference.html)

Expand All @@ -45,6 +45,10 @@ defmodule Test.ExampleTest do
end
```

## Releases

This project aims to track the release versioning found in [Playwright proper](https://github.com/microsoft/playwright).

## Contributing

### Getting started
Expand All @@ -60,6 +64,10 @@ end
- Start server: `bin/dev/start`
- Run tests and push: `bin/dev/shipit`

### Building assets for a release
### Releasing

`mix assets.build`
1. Update the version in `mix.exs`
a. Search for and update the version anywhere it appears in the repo, such as this README
2. `git tag -a v${version_number}` such that the tag look like `v1.44.0-alpha.3` or `v1.44.0`
3. `git push --tags`
4. `mix hex.publish`
Loading
Loading