Web UI and Playwright Quickstart
This guide creates a small browser test with a Playwright step and runs it as a Loadmill flow.
Before you start
You will need:
A Loadmill account.
A test suite with at least one flow.
A Loadmill Desktop App or private agent with UI testing enabled.
A web page that the execution environment can access.
Add a Playwright step
Open a test suite and select a flow.
Add a new step and choose Playwright.
Enter the contents of a Playwright
test()block. Do not include thetest()declaration itself.
await page.goto('https://www.loadmill.com');
await expect(page).toHaveTitle(/Loadmill/);Save the flow.
Run the test suite and inspect the step result.
The Playwright step receives a page, browser context, and testInfo. Suite and flow parameters are available directly as variables.
Record instead of writing the first version
With the Loadmill Desktop App running, use Record in the Playwright step. Interact with the browser window that opens, then close it when the journey is complete. Loadmill adds the generated Playwright actions to the step so you can review and refine them.
Continue
Learn the supported Playwright step syntax.
Run the flow across multiple browsers.
Combine browser actions with API requests in a hybrid flow.
Use debug mode to step through a test locally.
Last updated