gatling-playwright-plugin

Flow Action

Sometimes, you need to verify that a page has loaded programmatically. In such cases, you can use a script. Tracked as a normal Gatling request/response.

Note: You should always return browserSession.

browserAction("test").executeFlow((page,browserSession) => {
    page.navigate("https://docs.gatling.io/")
    page.locator("//*[@id=\"ai-initial-message\"]").isVisible()
    browserSession
})

Timeouts: see Timeouts — the same Playwright-native timeout rules apply to calls you make on page inside executeFlow, and callbacks must avoid blocking outside of them.

For advanced example see this guide


← API overview · BrowserSession · Open Action · Browser Session Function · Clean Context