Skip to main content

Praman 1.3.6: Playwright 1.62+1.63, Browser Dialogs, AI Integrity, and SAP Overlay Handling

· 5 min read
Maheshwar Kanitkar
Creator of Praman

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 flagAPI gatedWhat it enables
hasLocatorWaitForFunctionlocator.waitFor(predicate)Per-control wait predicates beyond global waitForUI5Stable
hasWebPScreenshotsWebP screenshot formatSmaller screenshot files with lossy compression
hasRetryStrategyIsolatedretries: { mode: 'isolated' }Isolated retry execution in clean browser contexts
hasAbortSignalAbortSignal on API methodsCancellable Playwright operations with abort controller
hasApiResponseTimingResource Timing on API responsesNative timing replaces Date.now() deltas in OData tracing
hasScrollOptionlocator.click({ scroll: 'none' })Opt out of auto-scroll before click actions

Playwright 1.63 — 8 flags:

Feature flagAPI gatedWhat it enables
hasTestLockstest({ lock: 'name' })Named test locks for parallel isolation of shared SAP state
hasSubtreeFrameLocatorlocator.frameLocator()Scoped frame locators for nested iframe content
hasVisibleLocatorlocator.visible()Boolean visibility check without assertion
hasStepParamstest.step(title, fn, { params })Structured parameters on test steps for reporting
hasAriaSnapshotJSONariaSnapshot() JSON outputMachine-readable accessibility snapshots for AI grounding
hasDialogClosedEventpage.on('dialogclosed')Detect-only observation of native browser dialogs
hasOpfsStorageStatestorageState({ opfs: true })Origin-private filesystem storage state persistence
hasHttpCredentialsArrayhttpCredentials array formMultiple 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:

MethodEventRiskGate
observe()dialogclosedNone — purely observationalPlaywright 1.63+, degrades to silence
register()dialogChanges behavior by existingAll 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​

IssuePRFix
#246#256agents/ and seeds/ not shipped in npm package — files[] guard prevents recurrence
—#296Reporter step classification: title-prefix → structural (80% → 0% misclassification)
—#300Malformed OData body crash guard + Resource Timing replaces Date.now()
—#226npx praman init now actually scaffolds a project
—#228Agent-asset validation now runs; Prettier no longer corrupts it
—#268Stale security overrides refreshed to current advisory ranges

Dependency Updates​

CategoryChange
Playwright@playwright/test 1.61.1 → 1.63.0
Testingvitest + @vitest/coverage-v8 4.x → 5.x
Lintingeslint → 10.12.0, eslint-plugin-n → 18.4.1
DocsDocusaurus suite to latest, docusaurus-plugin-llms 0.6.1
Securityhttp-proxy-middleware override 2.0.10, stale overrides refreshed
CI Actionscodeql-action v4.37.8 → v4.38.2, actions/checkout 7.0.0 → 7.0.1

14 dependency-related commits in total.


Upgrade Guide​

npm install [email protected]

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

Praman 1.3.6 is available on npm. Report issues on GitHub.