Documentation
Best Practices
Guides for authoring, running and analysing tests across web automation, API and performance — plus setup, collaboration and release notes.
Reducing flaky tests
Most flakiness comes from timing, overlays, and brittle locators. These practices keep runs stable.
Key takeaway: wait for the app explicitly, clear overlays before acting, and use stable locators — these remove the most common causes of intermittent failures.
Wait for the app, don't guess
- Use explicit waits (Wait Until Element Is Visible) for dynamic or late-loading content rather than relying only on the default implicit wait (~10s).
- Gate actions with Verify steps so a step only runs once the app is in the expected state.
- Avoid long fixed sleeps — prefer explicit waits that finish as soon as the condition is met, keeping runs both stable and fast.
Locate reliably
- Clear overlays first — cookie banners, modals, sticky headers — to avoid "click intercepted by another element."
- Use robust locators and re-locate after re-renders to avoid stale-element failures.
- Avoid index- or position-based locators (e.g. "the 3rd row") when the order can change between runs — anchor on stable text or attributes instead.
Keep data fresh and ordered
- Keep test data unique and fresh with Random Variables to avoid collisions.
- Mind variable order — make sure a variable's source step runs before the step that references it.
- Don't depend on data left behind by a previous run — generate or set up what each run needs so testcases stay independent and repeatable.
Branch intentionally and design around fail-fast
- Use the conditional If action for flows that legitimately branch, rather than forcing one rigid path.
- Design around fail-fast — fix the first failing step; the remaining steps show NOT_EXECUTED, which is a consequence, not a separate problem.
- Use Report and Continue deliberately — switch to it only when later steps should still run despite a failure; otherwise keep fail-fast so problems surface early.
Stable environment & tooling
- Record against embeddable, stable environments — sites that block framing (X-Frame-Options/CSP) won't load in the recorder.
- Set up the recorder extension and its site permissions first — without them the extension captures nothing.
- Record, then refine — clean up the captured steps and replace brittle auto-generated locators with stable ones instead of shipping the raw recording.
- Keep Chrome and the Local Agent up to date for local web runs — a browser/driver version mismatch fails the session before any step.
Related guides
