browser_mock_date_and_time
Control browser time for deterministic testing by freezing, shifting, or resetting Date and performance.now(). Persists across page navigations.
Instructions
Mock, freeze, or shift browser time for deterministic testing. Overrides Date, Date.now(), and performance.now(). Persists across page navigations.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "browser_mock_date_and_time"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "freeze" = stop time, "travel" = offset time, "reset" = restore native time | |
| deltaMs | No | Millisecond offset for travel mode | |
| isoDate | No | ISO 8601 date for freeze mode (e.g., "2025-01-01T00:00:00Z") |