Why playwright-praman for SAP UI5 Test Automation?
SAP UI5 applications break conventional Playwright selectors. Control IDs are generated, DOM structures change across UI5 versions, and themes swap entire subtrees. playwright-praman solves this by querying the UI5 runtime control registry directly — tests survive upgrades, theme changes, and custom CSS without maintenance.
The Problem with Standard Playwright on SAP
Standard Playwright selectors target the DOM. SAP UI5 renders controls into DOM nodes with auto-generated IDs like __button0-__clone42. These IDs change between page loads, UI5 patches, and themes. Teams using vanilla Playwright on SAP spend more time fixing selectors than writing tests.
// Fragile — breaks on every UI5 update
await page.click('#__xmlview0--createButton-__clone12-inner');
// Stable with playwright-praman — queries the UI5 control registry
const btn = await ui5.control({
controlType: 'sap.m.Button',
properties: { text: 'Create' },
});
await btn.press();
What playwright-praman Does Differently
1. Typed Control Proxies
Every SAP UI5 control gets a TypeScript proxy with full IntelliSense. You interact with Button.press(), Input.setValue(), Table.getRows() — not CSS selectors.
import { test, expect } from 'playwright-praman';
test('create purchase order', async ({ ui5, ui5Navigation }) => {
await ui5Navigation.navigateToApp('PurchaseOrder-manage');
const vendorInput = await ui5.control({
controlType: 'sap.m.Input',
properties: { name: 'Vendor' },
});
await vendorInput.setValue('1000');
});
2. UI5 Stability Synchronization
No more page.waitForTimeout(). Praman automatically waits for the UI5 framework to finish rendering, pending OData requests, and async model updates before every interaction.
3. Three Discovery Strategies
| Strategy | How It Works |
|---|---|
direct-id | Single ID lookup via sap.ui.core.Element.registry |
recordreplay | SAP RecordReplay API (UI5 >= 1.94) |
registry | Full registry scan matching type, properties, bindings |
Strategies run in priority order with automatic fallback — no single strategy needs to handle every control.
4. AI-Powered Test Generation
Describe your business process in plain language. AI agents (Claude Code, GitHub Copilot, Cursor) generate production-ready test scripts using Praman fixtures:
"Test creating a purchase order: navigate to ME21N, enter vendor 1000, add material MAT-001 with quantity 10."
The plan-generate-heal pipeline explores your live SAP system, discovers controls, generates the test, and fixes any failures autonomously.
5. Enterprise Coverage
- 61 UI5 control types across
sap.m,sap.ui.table,sap.ui.comp,sap.uxap,sap.f,sap.ui.mdc - 6 auth strategies — BTP SAML, Basic Auth, Office 365, Client Certificate, Custom IDP, Manual
- OData V2/V4 — mock, intercept, and assert OData requests
- Fiori Elements — List Report, Object Page, Overview Page helpers
- 10 custom Playwright matchers —
toHaveUI5Property,toBeUI5Visible, and more
How Does playwright-praman Compare to wdi5?
Both access the UI5 control registry. Praman adds:
- Typed proxies with IntelliSense for every control type
- AI test generation from business-language descriptions
- Fiori Elements page-object helpers for standard floorplans
- OData mock/intercept utilities built in
- 10 UI5-specific Playwright matchers extending
expect() - Three discovery strategies with automatic fallback chains
wdi5 is a solid choice. Praman targets teams that want AI-first generation, typed APIs, and deeper Fiori Elements support on top of Playwright.
Getting Started
npm install playwright-praman @playwright/test
npx playwright-praman init
Three production dependencies: commander, pino, zod — all MIT licensed.
Free and Open Source
playwright-praman is Apache-2.0 licensed. No license fees, no vendor lock-in. Every release includes npm provenance attestation and a CycloneDX SBOM.
If you're testing SAP S/4HANA, Fiori, or BTP applications with Playwright, give playwright-praman a try.
