Run and compare a scenario
nvda_run_scenarioRuns keyboard and typing scenarios, records NVDA speech and focus after each step, and compares results with a saved baseline to catch accessibility regressions.
Instructions
Run a scenario of key presses and typing, record what NVDA said and where focus went after each step, and compare it with a saved baseline: an accessibility regression test.
Start from the same place each time (the same window and control), or the results will differ. Needs key presses to be allowed, like nvda_press_keys.
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": {
"steps": "<steps>"
},
"name": "nvda_run_scenario"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | Steps in order, each with one of keys, text or wait_ms, for example [{"keys": ["tab"]}, {"text": "hello"}, {"keys": ["enter"], "until_speech": "sent"}]. | |
| baseline_file | No | A JSON file to compare with. If it does not exist, this run is saved there as the baseline. Keep it in the project, such as tests/a11y/login.json. | |
| ignore_pattern | No | A regular expression for text that changes between runs, such as times ('\d+:\d+'); ignored when comparing. | |
| update_baseline | No | Save this run as the new baseline instead of comparing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |