插件回放 API
回放 API 用于 Selenium IDE 的回放功能。
它的前缀是 /playback。
GET /playback/location
用于使用 Selenium IDE 解析定位器。
{
uri: "/playback/location",
verb: "get",
location: "valid IDE locator"
}
location- 有效的 Selenium IDE 定位器(例如css=input.submit)。
返回
如果找到元素,则返回该元素的 xpath,否则返回错误。
POST /playback/command
用于更改命令的状态(例如通过、失败等)。
{
uri: "/playback/command",
verb: "post",
commandId: "the command's id",
state: "valid state",
message: "a message to show the user"
}
commandId- 当前正在运行的测试用例中出现的命令的命令 ID。state- 有效的命令状态:(failed、fatal、passed、pending、undetermined)。message- 可选,向用户显示的消息,请注意,并非所有命令状态都支持显示消息。
返回
如果命令状态已更改,则返回 true。
POST /playback/log
用于 playback 日志,这意味着用户可以按 playback 日志组进行筛选。
在此处记录 playback 进度或状态的日志。
API 与 系统日志 相同。
