Praman 1.3.6: Playwright 1.62+1.63, Browser Dialogs, AI Integrity, and SAP Overlay Handling
Praman 1.3.6 is now available on npm. This release brings Playwright 1.62 and 1.63 support with 14 new feature flags, a browser dialog fixture for native alert/confirm/prompt/beforeunload detection, SAP overlay handling, UI5 diagnostics capture on failure, AI generator integrity with deterministic output and a CI drift gate, test locks for shared SAP state, and fixes for 6 bugs including #246.
What changed since v1.3.4
34 commits landed between v1.3.4 and v1.3.6 (v1.3.5 was a CI-only fix release with no user-facing changes). The highlights: two Playwright version bumps with 14 new compat flags, four new fixtures, a two-phase AI generator overhaul, and six bug fixes.
Playwright 1.62 + 1.63 — 14 New Feature Flags
Praman now detects and gates Playwright 1.62 and 1.63 APIs via 14 new feature flags in the internal PlaywrightFeatures interface, auto-detected at runtime:
Playwright 1.62 — 6 flags:
| Feature flag | API gated | What it enables |
|---|---|---|
hasLocatorWaitForFunction | locator.waitFor(predicate) | Per-control wait predicates beyond global waitForUI5Stable |
hasWebPScreenshots | WebP screenshot format | Smaller screenshot files with lossy compression |
hasRetryStrategyIsolated | retries: { mode: 'isolated' } | Isolated retry execution in clean browser contexts |
hasAbortSignal | AbortSignal on API methods | Cancellable Playwright operations with abort controller |
hasApiResponseTiming | Resource Timing on API responses | Native timing replaces Date.now() deltas in OData tracing |
hasScrollOption | locator.click({ scroll: 'none' }) | Opt out of auto-scroll before click actions |
Playwright 1.63 — 8 flags:
| Feature flag | API gated | What it enables |
|---|---|---|
hasTestLocks | test({ lock: 'name' }) | Named test locks for parallel isolation of shared SAP state |
hasSubtreeFrameLocator | locator.frameLocator() | Scoped frame locators for nested iframe content |
hasVisibleLocator | locator.visible() | Boolean visibility check without assertion |
hasStepParams | test.step(title, fn, { params }) | Structured parameters on test steps for reporting |
hasAriaSnapshotJSON | ariaSnapshot() JSON output | Machine-readable accessibility snapshots for AI grounding |
hasDialogClosedEvent | page.on('dialogclosed') | Detect-only observation of native browser dialogs |
hasOpfsStorageState | storageState({ opfs: true }) | Origin-private filesystem storage state persistence |
hasHttpCredentialsArray | httpCredentials array form | Multiple HTTP credential sets per browser context |
All flags are auto-detected at runtime. On older Playwright versions, all return false with zero behavior change. The peer dependency range remains ">=1.57.0 <2.0.0".
A new ceiling drift detector fails CI when an uncatalogued Playwright release is detected, ensuring new APIs are flagged before they ship uncovered.
Browser Dialog Fixture
Native alert/confirm/prompt/beforeunload dialogs were invisible to Praman — these are the browser's own dialogs, not sap.m.Dialog. SAP's "unsaved changes" warning on navigation is a native beforeunload dialog that Playwright auto-dismissed silently.
Two methods with different risk profiles:
| Method | Event | Risk | Gate |
|---|---|---|---|
observe() | dialogclosed | None — purely observational | Playwright 1.63+, degrades to silence |
register() | dialog | Changes behavior by existing | All Playwright versions |
import { test, expect } from 'playwright-praman';
test('detect unsaved changes dialog', async ({ ui5Navigation, nativeDialogs }) => {
nativeDialogs.observe();
await ui5Navigation.navigateToHash('Shell-home');
expect(nativeDialogs.records).toContainEqual(expect.objectContaining({ type: 'beforeunload' }));
});
SAP Overlay Handler
SAP applications show overlays — BusyIndicator, MessageToast, confirmation dialogs — that interrupt test actions. The new overlays fixture detects and handles these automatically using Playwright's addLocatorHandler.
Design principle: detect, don't dismiss. Handlers report overlays by default. Dismissal is opt-in per rule and logged at warn, because silently answering a dialog turns a real failure into a passing test.
UI5 Diagnostics on Failure
Failing tests now automatically capture and attach console output, page errors, and network requests. The opt-in clock fixture is available but never auto-installed — SAP session and token validity are time-sensitive.
AI Generator Integrity
A two-phase overhaul ensures generated artifacts are deterministic and auditable:
- Phase A (#261): Each generated artifact now has exactly one owner script — no more "last writer wins" races.
- Phase B (#264): Removed
new Date()stamps; output is now a pure function of input. CI drift gate (npm run validate:generated) fails if any artifact is stale.
Test Locks for Shared SAP State
Playwright 1.63 adds lock to test options for concurrent execution control. Praman adds a runtime guard and conventional lock names for SAP-specific shared state. The guard is fail-closed: on Playwright < 1.63, using lock throws with upgrade guidance rather than silently ignoring.
Bug Fixes
| Issue | PR | Fix |
|---|---|---|
| #246 | #256 | agents/ and seeds/ not shipped in npm package — files[] guard prevents recurrence |
| — | #296 | Reporter step classification: title-prefix → structural (80% → 0% misclassification) |
| — | #300 | Malformed OData body crash guard + Resource Timing replaces Date.now() |
| — | #226 | npx praman init now actually scaffolds a project |
| — | #228 | Agent-asset validation now runs; Prettier no longer corrupts it |
| — | #268 | Stale security overrides refreshed to current advisory ranges |
Dependency Updates
| Category | Change |
|---|---|
| Playwright | @playwright/test 1.61.1 → 1.63.0 |
| Testing | vitest + @vitest/coverage-v8 4.x → 5.x |
| Linting | eslint → 10.12.0, eslint-plugin-n → 18.4.1 |
| Docs | Docusaurus suite to latest, docusaurus-plugin-llms 0.6.1 |
| Security | http-proxy-middleware override 2.0.10, stale overrides refreshed |
| CI Actions | codeql-action v4.37.8 → v4.38.2, actions/checkout 7.0.0 → 7.0.1 |
14 dependency-related commits in total.
Upgrade Guide
No configuration changes required. All new features are either:
- Auto-detected (feature flags activate when Playwright 1.62/1.63 is detected)
- Opt-in (browser dialog fixture, overlay handler, clock fixture only activate when destructured in a test)
If you're on Playwright < 1.62, everything continues to work unchanged. To access the new fixtures:
npm install @playwright/test@latest
What's Next
- WebAuthn credentials fixture — passkey/FIDO2 testing for SAP systems
expect.soft.poll()wrapper — non-blocking assertions with retry- Overlay handler rule library — pre-built rules for common SAP overlays
- Playwright 1.64 tracking — compat layer ready for the next release cycle
