element_input
Input text into specified elements within WeChat Mini Programs. Use innerSelector to target elements inside custom components for precise text entry during automated testing.
Instructions
向指定元素输入文本。如需向自定义组件内部的元素输入,请使用 innerSelector 参数:selector 设为组件 ID 选择器(如 #my-component),innerSelector 设为组件内部元素的选择器。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| selector | Yes | ||
| innerSelector | No | ||
| value | 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"
},
"innerSelector": {
"minLength": 1,
"type": "string"
},
"selector": {
"minLength": 1,
"type": "string"
},
"value": {
"type": [
"string",
"number"
]
}
},
"required": [
"selector",
"value"
],
"type": "object"
}