@enekesabel/playwright-lite 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +18 -20
  2. package/dist/index.mjs +743 -187
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -41,8 +41,6 @@ playwright-lite is pre-1.0; APIs may change.
41
41
  npm add @enekesabel/playwright-lite
42
42
  ```
43
43
 
44
- Requires Node.js 20 or newer.
45
-
46
44
  ## Compatibility
47
45
 
48
46
  Targets Playwright **1.62.1**. Statuses describe API compatibility within the runtime boundaries above. API links open Playwright's current documentation.
@@ -61,8 +59,8 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
61
59
  | [`addInitScript`](https://playwright.dev/docs/api/class-page#page-add-init-script) | ❌ | |
62
60
  | [`addListener`](https://playwright.dev/docs/events) | ❌ | |
63
61
  | [`addLocatorHandler`](https://playwright.dev/docs/api/class-page#page-add-locator-handler) | ❌ | |
64
- | [`addScriptTag`](https://playwright.dev/docs/api/class-page#page-add-script-tag) | ❌ | |
65
- | [`addStyleTag`](https://playwright.dev/docs/api/class-page#page-add-style-tag) | ❌ | |
62
+ | [`addScriptTag`](https://playwright.dev/docs/api/class-page#page-add-script-tag) | ⚠️ | Rejects `path`, which reads the script from disk. Returned `ElementHandle` methods and options differ; see [ElementHandle compatibility](#elementhandle-compatibility). |
63
+ | [`addStyleTag`](https://playwright.dev/docs/api/class-page#page-add-style-tag) | ⚠️ | Rejects `path`, which reads the stylesheet from disk. Returned `ElementHandle` methods and options differ; see [ElementHandle compatibility](#elementhandle-compatibility). |
66
64
  | [`ariaSnapshot`](https://playwright.dev/docs/api/class-page#page-aria-snapshot) | ✅ | |
67
65
  | [`bringToFront`](https://playwright.dev/docs/api/class-page#page-bring-to-front) | ❌ | |
68
66
  | [`cancelPickLocator`](https://playwright.dev/docs/api/class-page#page-cancel-pick-locator) | ❌ | |
@@ -77,14 +75,14 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
77
75
  | [`context`](https://playwright.dev/docs/api/class-page#page-context) | ❌ | |
78
76
  | [`coverage`](https://playwright.dev/docs/api/class-page#page-coverage) | ❌ | |
79
77
  | [`dblclick`](https://playwright.dev/docs/api/class-page#page-dblclick) | ✅ | |
80
- | [`dispatchEvent`](https://playwright.dev/docs/api/class-page#page-dispatch-event) | ⚠️ | `JSHandle`/`ElementHandle` values in `eventInit` are not unwrapped. |
78
+ | [`dispatchEvent`](https://playwright.dev/docs/api/class-page#page-dispatch-event) | ✅ | |
81
79
  | [`dragAndDrop`](https://playwright.dev/docs/api/class-page#page-drag-and-drop) | ❌ | |
82
80
  | [`emulateMedia`](https://playwright.dev/docs/api/class-page#page-emulate-media) | ❌ | |
83
81
  | [`evaluate`](https://playwright.dev/docs/api/class-page#page-evaluate) | ⚠️ | Rejects `exposeFunctions: true`. |
84
- | [`evaluateHandle`](https://playwright.dev/docs/api/class-page#page-evaluate-handle) | ❌ | |
82
+ | [`evaluateHandle`](https://playwright.dev/docs/api/class-page#page-evaluate-handle) | ⚠️ | Rejects `exposeFunctions: true`. The returned handle previews differently; see [ElementHandle compatibility](#elementhandle-compatibility). |
85
83
  | [`exposeBinding`](https://playwright.dev/docs/api/class-page#page-expose-binding) | ❌ | |
86
84
  | [`exposeFunction`](https://playwright.dev/docs/api/class-page#page-expose-function) | ❌ | |
87
- | [`fill`](https://playwright.dev/docs/api/class-page#page-fill) | ⚠️ | The `force` option is unsupported. |
85
+ | [`fill`](https://playwright.dev/docs/api/class-page#page-fill) | ✅ | |
88
86
  | [`focus`](https://playwright.dev/docs/api/class-page#page-focus) | ✅ | |
89
87
  | [`frame`](https://playwright.dev/docs/api/class-page#page-frame) | 🚫 | Iframe realms are outside the single-document boundary. |
90
88
  | [`frameLocator`](https://playwright.dev/docs/api/class-page#page-frame-locator) | 🚫 | Iframe realms are outside the single-document boundary. |
@@ -139,7 +137,7 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
139
137
  | [`routeWebSocket`](https://playwright.dev/docs/api/class-page#page-route-web-socket) | ❌ | |
140
138
  | [`screencast`](https://playwright.dev/docs/api/class-page#page-screencast) | ❌ | |
141
139
  | [`screenshot`](https://playwright.dev/docs/api/class-page#page-screenshot) | ❌ | |
142
- | [`selectOption`](https://playwright.dev/docs/api/class-page#page-select-option) | ⚠️ | `ElementHandle` option values are unsupported. The `force` option is unsupported. |
140
+ | [`selectOption`](https://playwright.dev/docs/api/class-page#page-select-option) | ✅ | |
143
141
  | [`sessionStorage`](https://playwright.dev/docs/api/class-page#page-session-storage) | ✅ | |
144
142
  | [`setChecked`](https://playwright.dev/docs/api/class-page#page-set-checked) | ✅ | |
145
143
  | [`setContent`](https://playwright.dev/docs/api/class-page#page-set-content) | 🚫 | Document replacement is excluded. |
@@ -160,7 +158,7 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
160
158
  | [`video`](https://playwright.dev/docs/api/class-page#page-video) | ❌ | |
161
159
  | [`viewportSize`](https://playwright.dev/docs/api/class-page#page-viewport-size) | ❌ | |
162
160
  | [`waitForEvent`](https://playwright.dev/docs/api/class-page#page-wait-for-event) | ❌ | |
163
- | [`waitForFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function) | ⚠️ | Ignores `signal`. The returned handle implements only `jsonValue()` and `dispose()`, even when the predicate returns a DOM node. |
161
+ | [`waitForFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function) | ⚠️ | The returned handle previews differently; see [ElementHandle compatibility](#elementhandle-compatibility). |
164
162
  | [`waitForLoadState`](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) | ❌ | |
165
163
  | [`waitForNavigation`](https://playwright.dev/docs/api/class-page#page-wait-for-navigation) | ❌ | |
166
164
  | [`waitForRequest`](https://playwright.dev/docs/api/class-page#page-wait-for-request) | ❌ | |
@@ -182,22 +180,22 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
182
180
  | [`blur`](https://playwright.dev/docs/api/class-locator#locator-blur) | ✅ | |
183
181
  | [`boundingBox`](https://playwright.dev/docs/api/class-locator#locator-bounding-box) | ✅ | |
184
182
  | [`check`](https://playwright.dev/docs/api/class-locator#locator-check) | ✅ | |
185
- | [`clear`](https://playwright.dev/docs/api/class-locator#locator-clear) | ⚠️ | The `force` option is unsupported. |
186
- | [`click`](https://playwright.dev/docs/api/class-locator#locator-click) | ⚠️ | The `steps` option is unsupported. The action does not wait for navigation. |
183
+ | [`clear`](https://playwright.dev/docs/api/class-locator#locator-clear) | ✅ | |
184
+ | [`click`](https://playwright.dev/docs/api/class-locator#locator-click) | ⚠️ | The action does not wait for navigation. |
187
185
  | [`contentFrame`](https://playwright.dev/docs/api/class-locator#locator-content-frame) | 🚫 | Iframe realms are outside the single-document boundary. |
188
186
  | [`count`](https://playwright.dev/docs/api/class-locator#locator-count) | ✅ | |
189
- | [`dblclick`](https://playwright.dev/docs/api/class-locator#locator-dblclick) | ⚠️ | The `steps` option is unsupported. |
187
+ | [`dblclick`](https://playwright.dev/docs/api/class-locator#locator-dblclick) | ✅ | |
190
188
  | [`describe`](https://playwright.dev/docs/api/class-locator#locator-describe) | ✅ | |
191
189
  | [`description`](https://playwright.dev/docs/api/class-locator#locator-description) | ⚠️ | `describe('').description()` returns `''` instead of `null`; `describe('x').filter({}).description()` returns `null` instead of `'x'`. |
192
- | [`dispatchEvent`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event) | ⚠️ | `JSHandle`/`ElementHandle` values in `eventInit` are not unwrapped. |
190
+ | [`dispatchEvent`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event) | ✅ | |
193
191
  | [`dragTo`](https://playwright.dev/docs/api/class-locator#locator-drag-to) | ❌ | |
194
- | [`drop`](https://playwright.dev/docs/api/class-locator#locator-drop) | ❌ | |
192
+ | [`drop`](https://playwright.dev/docs/api/class-locator#locator-drop) | ⚠️ | Accepts only in-memory `{ name, mimeType, buffer }` file payloads; file paths are unsupported. Empty `mimeType` throws instead of inferring a MIME type. |
195
193
  | [`elementHandle`](https://playwright.dev/docs/api/class-locator#locator-element-handle) | ⚠️ | Returned `ElementHandle` methods and options differ; see [ElementHandle compatibility](#elementhandle-compatibility). |
196
194
  | [`elementHandles`](https://playwright.dev/docs/api/class-locator#locator-element-handles) | ⚠️ | Returned `ElementHandle` methods and options differ; see [ElementHandle compatibility](#elementhandle-compatibility). |
197
195
  | [`evaluate`](https://playwright.dev/docs/api/class-locator#locator-evaluate) | ⚠️ | Rejects `exposeFunctions: true`. |
198
196
  | [`evaluateAll`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all) | ✅ | |
199
- | [`evaluateHandle`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle) | ❌ | |
200
- | [`fill`](https://playwright.dev/docs/api/class-locator#locator-fill) | ⚠️ | The `force` option is unsupported. |
197
+ | [`evaluateHandle`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle) | ⚠️ | Rejects `exposeFunctions: true`. The returned handle previews differently; see [ElementHandle compatibility](#elementhandle-compatibility). |
198
+ | [`fill`](https://playwright.dev/docs/api/class-locator#locator-fill) | ✅ | |
201
199
  | [`filter`](https://playwright.dev/docs/api/class-locator#locator-filter) | ✅ | |
202
200
  | [`first`](https://playwright.dev/docs/api/class-locator#locator-first) | ✅ | |
203
201
  | [`focus`](https://playwright.dev/docs/api/class-locator#locator-focus) | ✅ | |
@@ -232,8 +230,8 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
232
230
  | [`pressSequentially`](https://playwright.dev/docs/api/class-locator#locator-press-sequentially) | ✅ | |
233
231
  | [`screenshot`](https://playwright.dev/docs/api/class-locator#locator-screenshot) | ❌ | |
234
232
  | [`scrollIntoViewIfNeeded`](https://playwright.dev/docs/api/class-locator#locator-scroll-into-view-if-needed) | ✅ | |
235
- | [`selectOption`](https://playwright.dev/docs/api/class-locator#locator-select-option) | ⚠️ | `ElementHandle` option values are unsupported. The `force` option is unsupported. |
236
- | [`selectText`](https://playwright.dev/docs/api/class-locator#locator-select-text) | ⚠️ | The `force` option is unsupported. |
233
+ | [`selectOption`](https://playwright.dev/docs/api/class-locator#locator-select-option) | ✅ | |
234
+ | [`selectText`](https://playwright.dev/docs/api/class-locator#locator-select-text) | ✅ | |
237
235
  | [`setChecked`](https://playwright.dev/docs/api/class-locator#locator-set-checked) | ✅ | |
238
236
  | [`setInputFiles`](https://playwright.dev/docs/api/class-locator#locator-set-input-files) | ⚠️ | Accepts only in-memory `{ name, mimeType, buffer }` objects; file paths and directory uploads are unsupported. Empty `mimeType` throws instead of inferring a MIME type. |
239
237
  | [`tap`](https://playwright.dev/docs/api/class-locator#locator-tap) | ❌ | |
@@ -242,11 +240,11 @@ Targets Playwright **1.62.1**. Statuses describe API compatibility within the ru
242
240
  | [`type`](https://playwright.dev/docs/api/class-locator#locator-type) | ✅ | |
243
241
  | [`uncheck`](https://playwright.dev/docs/api/class-locator#locator-uncheck) | ✅ | |
244
242
  | [`waitFor`](https://playwright.dev/docs/api/class-locator#locator-wait-for) | ✅ | |
245
- | [`waitForFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function) | ❌ | |
243
+ | [`waitForFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function) | ⚠️ | A promise returned by the page function is awaited before its value is judged; Playwright treats the returned promise object itself as truthy and stops waiting. |
246
244
 
247
245
  ### ElementHandle compatibility
248
246
 
249
- Returned `ElementHandle` objects do not implement `contentFrame()`, `dispatchEvent()`, `fill()`, `focus()`, `ownerFrame()`, `press()`, `screenshot()`, `scrollIntoViewIfNeeded()`, `selectOption()`, `selectText()`, `setInputFiles()`, `tap()`, `type()`, `evaluateHandle()`, `jsonValue()`, `getProperties()`, `getProperty()`, or `[Symbol.asyncDispose]()`. Pointer actions `click()`, `dblclick()`, `hover()`, `check()`, `uncheck()`, and `setChecked()` are implemented, but `signal` is unsupported; `click()` and `dblclick()` also reject `steps`, and `click()` does not wait for navigation. Their `$()` ignores `strict`; `inputValue()` ignores `timeout`; `waitForElementState()` rejects `signal`; `waitForSelector()` rejects `signal` and `strict`; `evaluate()` rejects `exposeFunctions: true`.
247
+ Returned `ElementHandle` objects do not implement `contentFrame()`, `ownerFrame()`, `screenshot()`, or `tap()`. Their `$()` ignores `strict`; `click()` does not wait for navigation; `waitForSelector()` rejects `strict`; `evaluate()` rejects `exposeFunctions: true`. A returned `JSHandle` or `ElementHandle` builds its `toString()` preview from the referenced value inside the document instead of reading a browser-process object description: the preview describes the value as it is when the handle is first converted to a string, and a handle to a `Proxy` prints the target's class name, such as `Object`, where Playwright prints `Proxy(Object)`.
250
248
 
251
249
  ## License
252
250