inject_latency
Adds artificial delay to specific requests to simulate slow networks and overloaded APIs, verifying loading indicators and graceful timeouts.
Instructions
Adds artificial delay to requests matching a URL pattern, simulating slow networks or overloaded APIs. Use to answer: does the app show loading states when the API takes 3 seconds? Does it time out gracefully?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to test | |
| viewport | No | Viewport size (default: 1280×720) | |
| jitter_ms | No | Random additional delay in milliseconds (default: 0) | |
| latency_ms | No | Base delay in milliseconds to add to each matched request (default: 3000) | |
| loading_selector | No | CSS selector for the loading state that should appear (e.g., '.skeleton-loader') | |
| intercept_pattern | Yes | Glob pattern for requests to delay (e.g., '**/api/**') |