Browser: Mock network response

Mock network responses for URLs matching a pattern via CDP Fetch domain.

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

FieldRequiredWhat it does
KeyYesURL pattern to intercept
BodyNoResponse body for matching requests
Content typeNoContent-Type header for the mock response Default: application/json.
StatusNoHTTP status code Default: 200.
VariableNoName of the variable where the result will be stored Default: mock_response.

See all Browser steps.

Errors

ErrorDescription
Browser not openNo 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.

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.