page_expectRoute
Assert the current page path matches an expected value, returning pass:false if not, without polling or errors.
Instructions
一次性断言当前页面路径是否等于预期值(不轮询、不抛错——失败返回 pass:false)。返回 {pass,expected,actual,snapshot:{path,query}},读 pass 判断结果。path 须与 page.path 同形:无前导 /、不含 query。若路由可能尚未稳定,先用 page_waitRoute 等到再断言。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| connection | No | 可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。 |