browserPressKey
Simulate keyboard key presses on web pages using Playwright, with options to target specific elements and adjust wait times for efficient browser automation.
Instructions
按键盘按键
Input Schema
Name | Required | Description | Default |
---|---|---|---|
key | Yes | 按键名称,如 'Enter', 'Tab', 'ArrowDown' 等 | |
pageId | Yes | 页面ID | |
ref | No | 可选:元素的xp引用值,如果指定则在该元素上按键 | |
waitForTimeout | No | 操作后等待获取快照的延迟时间(毫秒,默认2000) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"key": {
"description": "按键名称,如 'Enter', 'Tab', 'ArrowDown' 等",
"type": "string"
},
"pageId": {
"description": "页面ID",
"type": "string"
},
"ref": {
"description": "可选:元素的xp引用值,如果指定则在该元素上按键",
"type": "string"
},
"waitForTimeout": {
"description": "操作后等待获取快照的延迟时间(毫秒,默认2000)",
"type": "number"
}
},
"required": [
"pageId",
"key"
],
"type": "object"
}