Live demo ยท runs in your browser

Gherkin tests for UI5 apps, right here

On the left, a small OpenUI5 app: a product table with search, an Add dialog with a required field, and a confirmation before deleting. On the right, a feature that tests it. Press Run and watch each step find its control the way a user would, act on it and check the result.

The sandbox is loading. It needs JavaScript.

Change a step, or add one with the step builder: pick what to do, which control and where, and it writes the sentence. Or press Record and use the app: every click and entry becomes a step, named the way a user names it, and right-click (on a phone: press and hold) anything to check it. Break a step on purpose and see how a failure explains itself: a button that does not exist lists the buttons that do, closest first.

The steps are ui5-playwright-gherkin's, unchanged: the same code runs in Playwright in your pipeline. Here it runs on sandbox-playwright-gherkin's runner and Playwright-like driver, with nothing installed and nothing sent anywhere.

Put it on your page

npm install ui5-playwright-gherkin-sandbox @ui5/webcomponents @ui5/webcomponents-icons
npx ui5-playwright-gherkin-sandbox build-app public/app   # the demo app, needs @ui5/cli
import { mount } from "ui5-playwright-gherkin-sandbox";

mount(document.querySelector("#sandbox"), {
	base: "app/", app: "index.html", feature: "products.feature",
	sites: { Products: "index.html" }
});

Or point it at your own UI5 app, served from the same site, with your own feature file.

Three packages

The steps

ui5-playwright-gherkin

Gherkin steps for SAPUI5 and OpenUI5 apps with Playwright. One sentence pattern, controls found the way a user finds them, waits for UI5 built in.

The runner and driver

sandbox-playwright-gherkin

Runs Cucumber/Gherkin scenarios in any JavaScript environment, and drives a page in the browser with a Playwright-style API.

This sandbox

ui5-playwright-gherkin-sandbox

The editor, step builder, recorder and results on this page, wired to the two others. One dependency, one mount().