未知命令

**未知命令** 错误是 WebDriver 错误,当驱动程序无法识别命令/HTTP 端点时出现。

示例

/session/{session id}/foo 端点不存在,将返回一个未知命令错误,并带有 404 Not Found HTTP 状态码

bash
curl -i -d '{}' https://127.0.0.1:4444/session/foo
http
HTTP/1.1 404 Not Found
Connection: close
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 113
Date: Fri, 30 Mar 2018 15:30:51 GMT

{"value":{"error":"unknown command","message":"POST /session/asd did not match a known command","stacktrace":""}}

另请参阅