simulate_network_drop
Aborts matching browser requests after a delay to simulate a mid-flight connection drop and check whether the app shows fallback UI or degrades gracefully.
Instructions
Opens the browser, navigates to the application, and aborts requests matching a pattern after a delay, simulating a mid-flight connection drop. Use to answer: what happens if the network drops after the order request is sent but before the response arrives?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to test | |
| wait_ms | No | Milliseconds to wait after navigation before checking fallback (default: 2000) | |
| headless | No | Whether to run in headless mode (default: false, launches real browser so user sees application) | |
| viewport | No | Viewport size (default: 1280×720) | |
| drop_after_ms | No | Milliseconds to wait before aborting the request, simulating mid-flight drop (default: 500) | |
| preview_delay_ms | No | Milliseconds to pause after simulation before closing browser, allowing visual inspection (default: 2000) | |
| fallback_selector | No | CSS selector for the fallback UI that should appear (e.g., '.timeout-error') | |
| intercept_pattern | Yes | Glob pattern for requests to drop (e.g., '**/api/order**') | |
| keep_browser_open | No | Keep browser window open after test completes so user can interactively inspect the app (default: false) | |
| api_health_check_url | No | Optional backend or hosted API health check URL to verify before running chaos test. Aborts if backend is down or errors. |