Skip to main content
Use network steps to verify your UI sends the right data to the backend, or that the backend returns what you expect.

Wait for a single request

  1. Add a Register request listener step: provide a URL regex and a key (e.g. CHECKOUT_REQUEST).
  2. Trigger the request (submit a form, click a button, etc.).
  3. Add an Await listener step with the same key. Save the result to an environment variable (e.g. RESPONSE). The step fails if no matching request completes within the timeout.
  4. Add a JavaScript step to validate:
    assert(env.RESPONSE.response.status === 200);
    assert(env.RESPONSE.response.body.orderId);
    

Record multiple requests

  1. Add a Record requests step: provide a URL regex and a key (e.g. ANALYTICS_EVENTS).
  2. Trigger the requests (navigate, click, fill forms, etc.).
  3. Add a Get recorded requests step with the same key. Save the array to an environment variable (e.g. REQUESTS).
  4. Validate in a JavaScript step:
    assert(env.REQUESTS.length === 3);
    assert(env.REQUESTS.every((r) => r.response?.status === 200));
    
Requests that didn’t complete before Get recorded requests ran are still included in the array, without a response field.