Skip to main content
Use these recipes to upload and download files, select dropdown options, and capture network requests in web tests.

Upload files

Download files

Select options from a dropdown

Pick an option from a dropdown during a test. The approach depends on whether the element is a native <select> or a custom menu.
Inspect the element first to confirm whether it’s a native <select> or a custom menu (e.g. Headless UI, Radix, shadcn). The approach differs.

Native <select>

  1. Add a Select step and describe the element (e.g. “The country select”).
  2. Click Find using description to populate the options list.
  3. Choose an option by label, value, or index.

Custom dropdowns

For React/Vue component libraries (Headless UI, Radix, Material UI, shadcn, etc.), use two Click steps:
  1. Click on the dropdown trigger (e.g. “The country dropdown”).
  2. Click on the desired option (e.g. “USA inside the country dropdown”).

Record and validate network requests

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:

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:
Requests that didn’t complete before Get recorded requests ran are still included in the array, without a response field.