page_waitElement
Waits for a specified selector element to appear on the page, ensuring elements are loaded before proceeding with automation tasks in WeChat Mini Program development.
Instructions
等待指定选择器的元素出现在页面上。注意:此方法不适用于自定义组件内部元素,仅能等待页面级别的元素。如需等待自定义组件内部元素,请使用 page_waitTimeout 配合 element 相关工具进行轮询检查。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| selector | Yes |
Input Schema (JSON Schema)
{
"properties": {
"connection": {
"additionalProperties": false,
"properties": {
"account": {
"minLength": 1,
"type": "string"
},
"args": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"not": {}
}
]
},
"autoClose": {
"type": "boolean"
},
"cliPath": {
"minLength": 1,
"type": "string"
},
"cwd": {
"minLength": 1,
"type": "string"
},
"mode": {
"enum": [
"launch",
"connect"
],
"type": "string"
},
"port": {
"exclusiveMinimum": 0,
"type": "integer"
},
"projectPath": {
"minLength": 1,
"type": "string"
},
"ticket": {
"minLength": 1,
"type": "string"
},
"timeout": {
"exclusiveMinimum": 0,
"type": "integer"
},
"trustProject": {
"type": "boolean"
},
"wsEndpoint": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"selector": {
"minLength": 1,
"type": "string"
}
},
"required": [
"selector"
],
"type": "object"
}