tamash-playwright 0.13.0-beta.1 → 0.13.0-beta.2
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.
- package/CHANGELOG.md +4 -0
- package/README.md +3 -1
- package/package.json +1 -1
- package/usage.md +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,10 @@ All notable changes to this project are documented here. Format loosely follows
|
|
|
9
9
|
|
|
10
10
|
- **A context/page built off `browser` in `test.beforeAll` (shared across tests) was never healing-aware.** Only the `context`/`page` fixtures were wrapped with the healing proxy — a consumer using `test.beforeAll(async ({ browser }) => { context = await browser.newContext(); page = await context.newPage(); })` to log in once and reuse the session across every test in a file bypassed both, so nothing built that way ever healed. Found via a real support report. Fixed: the `browser` fixture is now wrapped too (`bindBrowser()`, `src/bindings/locator.binding.ts`) — `browser.newContext()`, `browser.newPage()`, and `browser.contexts()` all now hand back healing-aware objects, exactly like `context.newPage()` already did. Doesn't cover a browser obtained entirely outside the fixture system (e.g. `chromium.launch()` in `globalSetup`) — see "What else it heals" in README.md/usage.md for the manual `bindContext()`/`bindPageActions()` escape hatch for that case.
|
|
11
11
|
|
|
12
|
+
### Docs
|
|
13
|
+
|
|
14
|
+
- **README.md/usage.md/feature.md now lead with the actual rule, not just examples of it.** The `browser`-in-`beforeAll` fix above was documented as a bullet point alongside popups/iframes, which left the real boundary implicit: *any* browser/context/page from Playwright's own fixtures heals automatically, however many hops away and however it's reused, while anything built outside the fixture system (`chromium.launch()` directly, or `globalSetup`) still needs manual `bindContext()`/`bindPageActions()`. Now stated as the first thing in "What else it heals," not inferred from bullets.
|
|
15
|
+
|
|
12
16
|
## [0.12.0] - 2026-09-13
|
|
13
17
|
|
|
14
18
|
### Added
|
package/README.md
CHANGED
|
@@ -331,10 +331,12 @@ Everything below applies identically in both places — same package, same behav
|
|
|
331
331
|
|
|
332
332
|
## What else it heals — no extra setup needed
|
|
333
333
|
|
|
334
|
+
**The rule that decides all of this**: if `browser`, `context`, or `page` came from Playwright's own fixtures — destructured from a test/`beforeAll`/`beforeEach` callback, e.g. `test('...', async ({ browser }) => {...})` — then everything built from it heals automatically, no matter how many hops away: `browser.newContext()` → `.newPage()`, stashed in a variable, reused across other tests, with `storageState`, whatever. If it *didn't* come from a fixture — a browser launched directly with `chromium.launch()`, or anything built inside `globalSetup` — it needs manual wrapping; see [If you build a context/page outside the fixture system entirely](#if-you-build-a-contextpage-outside-the-fixture-system-entirely) below.
|
|
335
|
+
|
|
334
336
|
Beyond a single broken `click`/`fill`/`getByRole` on the main page, all of this works automatically once you've done Steps 1–2:
|
|
335
337
|
|
|
336
338
|
- **Popups and extra tabs.** A page opened via `context.newPage()`, `window.open`, or a `target="_blank"` link is just as healing-aware as your main `page` — no manual wrapping needed.
|
|
337
|
-
- **A context/page built from `browser` in `test.beforeAll`.** The common "log in once, reuse the session across every test in the file" pattern — `test.beforeAll(async ({ browser }) => { context = await browser.newContext(); page = await context.newPage(); })` — heals too,
|
|
339
|
+
- **A context/page built from `browser` in `test.beforeAll`.** The common "log in once, reuse the session across every test in the file" pattern — `test.beforeAll(async ({ browser }) => { context = await browser.newContext(); page = await context.newPage(); })` — heals too, per the rule above.
|
|
338
340
|
- **Elements inside `<iframe>`s.** `page.frameLocator('#my-iframe')` and anything chained off it heals the same way, scoped correctly to the iframe's own document. Playwright 1.63's no-argument `page.frameLocator()` ("match in any frame") also heals when the page has a single frame; on a page with several frames it can't be told which one you meant, so healing steps aside cleanly (no wrong-frame guess) — pass an explicit `frameLocator('#id')` there.
|
|
339
341
|
- **Most of the Playwright API surface**, not just clicks and fills — `check`, `selectOption`, `dragTo`, `dispatchEvent`, read methods like `textContent`/`getAttribute`/`isChecked`, `screenshot`, and more. A few are deliberately excluded, but still reported honestly on failure rather than silently retried: `dragTo`/`drop` can't be safely healed by guessing a replacement element for just one side of a two-sided drag, and `waitFor` is a state check rather than an action — a timeout on it can mean a genuinely broken selector, or that the element correctly never reached the expected state (verifying something does *not* appear, say), which can't be told apart from the error alone. (`expect(locator).toBeVisible()` and similar assertions are excluded for the same reason, but never even reach this mechanism — they're Playwright's own matcher, not a method this wraps.)
|
|
340
342
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamash-playwright",
|
|
3
|
-
"version": "0.13.0-beta.
|
|
3
|
+
"version": "0.13.0-beta.2",
|
|
4
4
|
"description": "Plug and Play Self-healing for Playwright and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, Gemini, or a Claude/GitHub Copilot subscription).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/usage.md
CHANGED
|
@@ -193,8 +193,10 @@ Everything below applies identically in both places — same package, same behav
|
|
|
193
193
|
|
|
194
194
|
## What else it heals — no extra setup
|
|
195
195
|
|
|
196
|
+
**The rule that decides all of this**: if `browser`, `context`, or `page` came from Playwright's own fixtures — destructured from a test/`beforeAll`/`beforeEach` callback, e.g. `test('...', async ({ browser }) => {...})` — then everything built from it heals automatically, no matter how many hops away: `browser.newContext()` → `.newPage()`, stashed in a variable, reused across other tests, with `storageState`, whatever. If it *didn't* come from a fixture — a browser launched directly with `chromium.launch()`, or anything built inside `globalSetup` — it needs manual wrapping; see [If you build a context/page outside the fixture system entirely](#if-you-build-a-contextpage-outside-the-fixture-system-entirely) below.
|
|
197
|
+
|
|
196
198
|
- **Popups and extra tabs.** A page opened via `context.newPage()`, `window.open`, or a `target="_blank"` link is just as healing-aware as your main `page`.
|
|
197
|
-
- **A context/page built from `browser` in `test.beforeAll`.** The common "log in once, reuse the session across every test in the file" pattern — `test.beforeAll(async ({ browser }) => { context = await browser.newContext(); page = await context.newPage(); })` — heals too,
|
|
199
|
+
- **A context/page built from `browser` in `test.beforeAll`.** The common "log in once, reuse the session across every test in the file" pattern — `test.beforeAll(async ({ browser }) => { context = await browser.newContext(); page = await context.newPage(); })` — heals too, per the rule above.
|
|
198
200
|
- **Elements inside `<iframe>`s.** `page.frameLocator('#my-iframe')` and anything chained off it heals the same way, correctly scoped to the iframe's own document. Playwright 1.63's no-argument `page.frameLocator()` ("match in any frame") also heals on a single-frame page; when several frames are present the healer can't tell which was meant and steps aside cleanly rather than guess — use an explicit `frameLocator('#id')` in that case.
|
|
199
201
|
- **Most of the Playwright API surface**, not just clicks and fills — `check`, `selectOption`, `dragTo`, `dispatchEvent`, read methods like `textContent`/`getAttribute`/`isChecked`, `screenshot`, and more. `dragTo`, `drop`, and `waitFor` are reported honestly on failure rather than guessed at — the first two because a two-sided drag can't be safely fixed by guessing one side, `waitFor` because a timeout on it can be a correct test outcome (e.g. verifying an absence), not a broken selector. `expect(locator).toBeVisible()` and similar assertions are excluded the same way, but never reach this mechanism at all — they're Playwright's own matcher, not a method this wraps.
|
|
200
202
|
|