Praman 1.2: Playwright 1.57+, TypeScript 6 & 5, CLI Agents, MCP Agents, Unified ui5= Selector Engine, and Interactive Inspector
We are releasing Praman 1.2.0 to the latest tag on npm today. This is the largest functional update since the v1.0 launch, bringing first-class support for
Playwright 1.57+, TypeScript 6.x & 5.x, Praman CLI Agents, Praman MCP Agents, a completely rewritten ui5= selector engine, a live interactive inspector,
OpenTelemetry tracing & metrics, and a battery of quality-of-life improvements for teams building SAP UI5 test automation at scale.
What changed since v1.1.2β
Sixty-six commits landed between v1.1.2 and v1.2.0, touching the selector engine, CLI tooling, configuration system, error messages, CI pipeline, and documentation. Here is everything that matters.
π Playwright 1.57+ β Tested, Validated, Flaggedβ
Praman now tracks Playwright 1.57+ as its peer baseline, and the CI matrix now runs both @playwright/test@stable and @playwright/test@next (canary)
on every push. This means Praman validates against upcoming Playwright changes before they ship, giving teams early warning of regressions.
Playwright introduced several powerful new APIs. Praman exposes all of them behind opt-in feature flags so your existing tests are unaffected:
| Flag | API | What it does |
|---|---|---|
playwrightFeatures.screencast | page.screencast | Programmatic video β start/stop recording, overlays, real-time frames |
playwrightFeatures.ariaSnapshotDepth | locator.ariaSnapshot({ depth }) | Scoped accessibility tree snapshots β ideal for deep SAP component hierarchies |
playwrightFeatures.setStorageState | browserContext.setStorageState() | Replace auth state in-place without spawning a new context |
playwrightFeatures.locatorNormalize | locator.normalize() | Auto-convert ad-hoc selectors to aria-role / test-id best practices |
playwrightFeatures.urlPatternMatcher | URL Pattern API in toHaveURL | Modern URL Pattern matching instead of RegExp |
Enable any flag in playwright.config.ts:
import { defineConfig } from 'playwright-praman';
export default defineConfig({
use: {
pramanConfig: {
playwrightFeatures: { screencast: true },
},
},
});
π· TypeScript 6.x & 5.x β Future-Proof Supportβ
Praman is now compiled and shipped with TypeScript 6.0.2, with full backward compatibility for TypeScript 5.x. Every exported type, generic, and conditional type has been audited against TS 6 semantics. The CI matrix runs a TS compatibility job that builds the package against both TS 5.9 and TS 6.0.
If you are still on TypeScript 5.x, nothing changes. If you have migrated to TS 6.0, all Praman APIs now give you accurate inference, narrowing, and editor completions under the stricter TS 6 rules.
π A New ui5= Selector Engineβ
The most architecturally significant change in v1.2 is the complete rewrite of the UI5 selector engine.
The old approach: three separate parsersβ
v1.1 shipped three distinct engines β a CSS engine, an XPath engine, and a legacy ui5-selector-engine. They had overlapping responsibilities, inconsistent error messages, and subtle differences in how they handled array properties or negative positions.
The new approach: one engine, two syntaxesβ
v1.2 ships a unified engine powered by fontoxpath (fully conformant XPath 3.1) and css-selector-parser. The CSS-style selectors you already write (sap.m.Button[text=Save]) are parsed to an AST, converted to XPath 3.1, and evaluated against an in-memory XML DOM that mirrors the live UI5 control tree of the page.
This is the same approach used by playwright-ui5 β proven in production SAP environments.
New selectors you can use todayβ
// :labeled() β find a control by the sap.m.Label that points to it
page.locator("ui5=sap.m.Input:labeled('Vendor Number')");
// :not() β exclude controls
page.locator('ui5=sap.m.Button:not([type=Back])');
// Descendant combinator β any Button inside a Panel
page.locator('ui5=sap.m.Panel sap.m.Button[text=Save]');
// Child combinator β direct children only
page.locator('ui5=sap.m.Panel > sap.m.Button');
// Adjacent sibling β Input immediately after a Label
page.locator('ui5=sap.m.Label + sap.m.Input');
// Positional
page.locator('ui5=sap.m.ColumnListItem:nth-child(2)');
page.locator('ui5=sap.m.ColumnListItem:first-child');
page.locator('ui5=sap.m.ColumnListItem:last-child');
Migrationβ
If your tests use the enableXpathEngine config option, remove it. The unified engine handles both CSS-style and XPath selectors β no per-engine configuration is needed. All other selectors continue to work unchanged.
π¬ npx praman inspect β Find Controls Without Guessingβ
The most-requested developer experience improvement: a live interactive inspector that lets you click any element in a running SAP app and instantly see the UI5 control metadata and copy-paste-ready selectors.
# Point it at your SAP Fiori Launchpad
npx praman inspect https://my-sap.example.com/sap/bc/ui5_ui5/...
# Pass a Playwright storageState file to authenticate
npx praman inspect https://my-sap.example.com --auth .auth/user.json
Click any element in the headed browser and the terminal prints:
βββ Clicked: sap.m.Button βββββββββββββββββββββββββββββββββ
ID: __button0--orderCreateBtn
Type: sap.m.Button
Visible: true Enabled: true
Properties:
text = "Create Order"
type = "Emphasized"
Bindings:
text β {i18n>CREATE_ORDER}
βββ Selectors (best β worst) ββββββββββββββββββββββββββββββ
β ui5=sap.m.Button[text=Create Order]
β‘ ui5=sap.m.Button#orderCreateBtn
β’ ui5=sap.m.Button[text=Create Order][type=Emphasized]
Fixture:
await ui5.control({ controlType: 'sap.m.Button', properties: { text: 'Create Order' } });
Selectors are ranked by stability: semantic property matches first, IDs second, composite selectors last. The browser highlights the selected control with a blue overlay so you can confirm you clicked the right element.
This makes writing your first test against an unfamiliar SAP app dramatically faster. Instead of opening DevTools, digging through the DOM, and guessing control types, you click and copy.
βοΈ Two New CLI Commandsβ
npx praman configβ
Prints the fully resolved PramanConfig β every value, including those injected by environment variables β so you can quickly debug why a CI run is using different auth credentials than your local machine.
npx praman config
Nested Environment Variablesβ
Configuration now supports deep injection via environment variables. No more editing playwright.config.ts per CI environment:
# Set AI provider in CI
PRAMAN_AI_PROVIDER=azure-openai
PRAMAN_AI_API_KEY=${{ secrets.AZURE_OPENAI_KEY }}
# Set telemetry in CI
PRAMAN_TELEMETRY_ENABLED=true
PRAMAN_TELEMETRY_ENDPOINT=https://otel-collector:4318
π Extension Systemβ
Praman now ships a plugin API that lets shared testing libraries ship custom matchers and fixture extensions:
import { defineExtension } from 'playwright-praman';
export const approvalExtension = defineExtension({
name: 'approval-workflow',
matchers: {
toHaveApprovalStatus: async (proxy, expected) => {
const status = await proxy.getProperty('approvalStatus');
return {
pass: status === expected,
message: () => `Expected ${expected}, got ${status}`,
};
},
},
});
Register extensions in defineConfig:
export default defineConfig({
use: { pramanConfig: { extensions: [approvalExtension] } },
});
π€ Praman CLI Agents for Playwrightβ
Praman now supports Playwright CLI Agents β plan, generate, and heal SAP UI5 tests directly from the
command line using Claude Code's playwright-cli skill. Token-efficient browser automation via stdin/stdout, optimized
for Claude Code, GitHub Copilot, and Cursor. No MCP server required.
Three agents ship out of the box:
- Planner β explores a live SAP app and produces a structured test plan
- Generator β generates compliant Playwright tests from the plan
- Healer β debugs and fixes failing tests with SAP domain knowledge
Learn more: CLI Agents Guide Β· Running Your Agent
π Praman MCP Agentsβ
For richer inline feedback and IDE integrations, Praman also supports MCP (Model Context Protocol) agents β a JSON-RPC server that provides structured accessibility snapshots, live control discovery, and step-level feedback to AI agents running inside VS Code Copilot, Cursor, and JetBrains AI.
Both CLI and MCP agents are installed by default with npx playwright-praman init.
See MCP vs CLI for a comparison of when to use each approach.
π€ Playwright CLI Agents β Now the Defaultβ
This is a quality-of-life change with a big practical impact for teams getting started.
Previously, Playwright CLIβbased agents (the token-efficient alternative to MCP) required
an explicit --cli opt-in flag. Starting with this release, CLI agents are installed by default
alongside MCP agents whenever you run init or init-agents. If you only want MCP agents, pass --no-cli.
Auto-install of peer dependenciesβ
init now checks for β and installs β four packages in a single npm install call if any are missing:
| Package | Role |
|---|---|
@playwright/test | Playwright test runner |
@playwright/cli | Playwright CLI for agent browser control |
playwright-praman | The plugin itself |
dotenv | Environment variable loading |
This means npm install playwright-praman && npx playwright-praman init is the complete setup
sequence β no separate npm install @playwright/test @playwright/cli step required.
Flag changeβ
| Before | After |
|---|---|
--cli (opt-in, default off) | --no-cli (opt-out, default on) |
# Install everything including CLI agents (new default)
npx playwright-praman init
# MCP agents only
npx playwright-praman init --no-cli
# init-agents β same default
npx playwright-praman init-agents --loop=claude
npx playwright-praman init-agents --loop=copilot --no-cli
A warning is printed when @playwright/cli is absent from node_modules but CLI agents are
being scaffolded, so you know exactly what to run if you skipped auto-install.
π Errors Now Link to Docsβ
Every PramanError now carries a docsUrl pointing directly to the relevant documentation anchor. The URL appears in the terminal, in serialized JSON for reporting, and in the AI-envelope when errors are surfaced to LLM agents:
ControlError: Control not found: sap.m.Button[text=Save]
code: ERR_CONTROL_NOT_FOUND
docsUrl: https://praman.dev/docs/guides/errors#err-control-not-found
suggestions:
- Verify the control type and property value in the UI5 view
- Try: npx praman inspect <url>
β¬οΈ Node.js 22 Minimumβ
Node.js 20 reached End-of-Life in April 2026. Praman v1.2 requires Node.js 22 or later.
Update your CI workflow:
- uses: actions/setup-node@v4
with:
node-version: '22'
π Zero Vulnerabilitiesβ
All npm audit findings β in both the main package and the docs/ workspace β are resolved to zero. Every security bump has been validated for compatibility with Praman's zero-tolerance CI gates.
π‘ OpenTelemetry Tracing & Metricsβ
Praman now ships with full OpenTelemetry integration for distributed observability. Telemetry is disabled by default with zero overhead β enable it when you need end-to-end visibility into test execution.
| Feature | What it does |
|---|---|
| Tracing | Spans for control discovery, bridge evaluation, test lifecycle |
| Metrics | Counters (pass/fail/skip, discovery, injection) and histograms (duration) |
| OTel Reporter | Playwright reporter emitting nested spans per test step |
| Live correlation | OTel traceId embedded in Playwright trace titles |
Three exporters are supported: OTLP (Jaeger, Grafana Tempo, any OTLP collector), Jaeger (native OTLP), and Azure Monitor (via Application Insights connection string).
npm install @opentelemetry/api @opentelemetry/sdk-node @opentelemetry/exporter-trace-otlp-http
docker compose -f docs/docker-compose.otel.yml up -d
PRAMAN_TELEMETRY_ENABLED=true PRAMAN_TELEMETRY_ENDPOINT=http://localhost:4318 npx playwright test
# Open Jaeger UI at http://localhost:16686
Dependencies are optional peer deps β not installed unless you opt in. When disabled, all telemetry calls are no-ops with negligible overhead. See the Telemetry Setup Guide for detailed configuration.
π 100% TSDoc Coverageβ
TypeDoc now reports zero warnings across all public exports. Every exported function, class, interface, and type has:
@paramannotations for all parameters@returnsdescribing the return value@throwslisting typed error classes@examplewith a working code snippet
Other Improvementsβ
- Playwright Canary CI: Integration tests now run against
@playwright/test@nextin a separate matrix job, catching regressions before Playwright stable releases. - ADR-030 added: Architecture Decision Record for OPA5 migration strategy with code samples for hybrid OPA5 + Praman test suites.
- 100% documentation accuracy: Eliminated fictional APIs and mismatched examples across 42 documentation files.
- Locator Selector Syntax guide: New comprehensive guide for the
ui5=custom engine covering all selector forms, pseudo-classes, and combinators. - Docs verification pipeline: 6 automated checks (typecheck snippets, API references, config defaults, import paths, AI review, SAP UI5 API) validate documentation accuracy on every PR.
Upgrading from v1.1β
npm install playwright-praman@latest
Breaking changes in v1.2: One β the enableXpathEngine configuration field has been removed. Simply delete it from your PramanConfig; the unified selector engine replaces its functionality automatically.
All fixtures, matchers, proxies, and authentication strategies remain source-compatible. No test code changes are required.
What's nextβ
The roadmap for v1.3 focuses on:
- OPA5 migration agent (ADR-030): An automated agent that reads existing OPA5 test files and generates equivalent Praman tests, including control mapping and assertion translation.
- BTP Work Zone multi-tenant improvements to the
btpWorkZonefixture. - Playwright MCP integration: First-class support for
@playwright/mcpsession hand-off to Praman's AI agents.
Follow the project on GitHub or subscribe to the npm package for release notifications.
Praman is open-source under the Apache-2.0 license. Docs Β· npm Β· GitHub Β· Discord
