Add resilient UI helpers for third-party / adversarial SPAs.
CI / release (pull_request) Has been skipped
CI / skip-ci-check (pull_request) Successful in 5s
CI / secret-scan (pull_request) Successful in 4s
CI / build-and-test (pull_request) Successful in 23s
CI / selftest (pull_request) Successful in 15s

Generalize patterns from LinkedIn automation: aria-label regex locators,
dialog reopen-retry, contenteditable typing, persistent flag-file sessions,
and a default noise exclude preset for NetworkErrorMonitor.
This commit is contained in:
2026-07-15 18:17:02 -04:00
parent ee7b130db0
commit 8b30ab5a6d
15 changed files with 784 additions and 1 deletions
+10
View File
@@ -15,6 +15,16 @@ Living plan for making `@levkin/playkit` more useful across Levkin repos.
- [ ] End adoption pause — migrate first extra consumer (`screening` candidate)
- [ ] Evaluate `playwright-exporter` for scheduled synthetics (may supersede bespoke cron wrappers around `playkit smoke`)
## Done since v0.4.0 (resilient UI automation)
Pulled from real friction driving LinkedIn (third-party, bot-walled, no test ids) from a Cursor/Camoufox automation — see the resume repo's `scripts/linkedin-polish-all.mjs` for the original hand-rolled versions these replace.
- [x] `byAriaLabel` / `clickByAriaLabel` — regex-over-`aria-label` locator, scoped to page or a narrower locator
- [x] `withDialog` — reopen-and-retry wrapper for modals that can silently close mid-flow
- [x] `fillContentEditable` — real-keyboard typing into `contenteditable` rich text with paragraph breaks
- [x] `runPersistentSession` — flag-file-driven long-lived browser session (RUN/READY/CLOSE), auto-relaunch on crash
- [x] `NetworkErrorMonitor` `useDefaultExcludes` + `COMMON_NOISE_PATTERNS` (ad/telemetry noise preset)
## Done since v0.4.0 (ops)
- [x] **Wire `NPM_PUBLISH_TOKEN` / `write:package`**`@levkin/playkit@0.4.0` published; Actions secret + `vault_playkit_npm_token`; release job no longer soft-fails (`docs/OPS.md`)