Help Centre › Building Processes
Mock network responses for URLs matching a pattern via CDP Fetch domain.
Add it to a process
In the process designer, open the Add step tab. Find Mock network response under Browser › Network, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| Key | Yes | URL pattern to intercept |
| Body | No | Response body for matching requests |
| Content type | No | Content-Type header for the mock response Default: application/json. |
| Status | No | HTTP status code Default: 200. |
| Variable | No | Name of the variable where the result will be stored Default: mock_response. |
See all Browser steps.
Errors
| Error | Description |
|---|---|
| Browser not open | No browser session is active. |
Tips
- Set up mocks before navigating to the page that makes the requests.
- Use Clear response mocks to remove all mocks and restore normal behaviour.
- Multiple mocks can be active at the same time for different URL patterns.
- Useful for testing error scenarios by returning 4xx or 5xx status codes.