ms-vite-plugin 1.4.43 → 1.4.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/api/global.md +70 -15
- package/docs/api/node.md +29 -27
- package/docs/apicn/global.md +65 -10
- package/docs/apicn/node.md +29 -27
- package/docs/apipython/g.md +74 -23
- package/docs/apipython/node.md +29 -26
- package/docs/httpapi/api.md +190 -189
- package/package.json +1 -1
package/docs/apipython/node.md
CHANGED
|
@@ -111,16 +111,16 @@ list_page = node.createNodeSelector({"mode": 2})
|
|
|
111
111
|
|
|
112
112
|
| 方法 | 说明 |
|
|
113
113
|
| --- | --- |
|
|
114
|
-
| `hittable()` |
|
|
115
|
-
| `scrollToVisible()` |
|
|
116
|
-
| `tap()` |
|
|
117
|
-
| `doubleTap()` |
|
|
118
|
-
| `press(duration=500)` | 长按,毫秒,默认 500 |
|
|
119
|
-
| `clickCenter()` |
|
|
120
|
-
| `clickRandom()` |
|
|
121
|
-
| `clearInput()` |
|
|
122
|
-
| `input(text)` |
|
|
123
|
-
| `setValue(text)` |
|
|
114
|
+
| `hittable()` | 当前是否可点击(可见且未被挡住) |
|
|
115
|
+
| `scrollToVisible()` | 仅滚动到可见,不点击;一般不必手动调用 |
|
|
116
|
+
| `tap()` | 单击;不可见时会先自动滚到可见 |
|
|
117
|
+
| `doubleTap()` | 双击;不可见时会先自动滚到可见 |
|
|
118
|
+
| `press(duration=500)` | 长按,毫秒,默认 500;不可见时会先自动滚到可见 |
|
|
119
|
+
| `clickCenter()` | 点击中心(坐标点击,不会自动滚动) |
|
|
120
|
+
| `clickRandom()` | 范围内随机点击(坐标点击,不会自动滚动) |
|
|
121
|
+
| `clearInput()` | 清空输入(内部会先 `tap` 聚焦,因而也会自动滚到可见) |
|
|
122
|
+
| `input(text)` | 追加输入(不先清空;内部会先 `tap` 聚焦) |
|
|
123
|
+
| `setValue(text)` | 设置值(见下方;不可见时会先自动滚到可见) |
|
|
124
124
|
| `parent()` / `child(i)` / `allChildren()` | 父 / 子 / 全部子节点 |
|
|
125
125
|
| `siblings()` / `previousSiblings()` / `nextSiblings()` | 兄弟节点 |
|
|
126
126
|
|
|
@@ -173,17 +173,19 @@ selector.type("XCUIElementTypeTextField").enabled(True).getOneNodeInfo(3000)
|
|
|
173
173
|
|
|
174
174
|
### 是否可点 / 滚到可见
|
|
175
175
|
|
|
176
|
+
`tap` / `doubleTap` / `press` / `setValue`(以及内部会先 `tap` 的 `clearInput` / `input`)在元素当前不可见时,会**自动**先滚到可见再操作,一般不用手写滚动:
|
|
177
|
+
|
|
176
178
|
```python
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
# 推荐:直接操作,不可见时会自动滚到可见
|
|
180
|
+
node.tap()
|
|
181
|
+
node.doubleTap()
|
|
182
|
+
node.press(800)
|
|
183
|
+
node.setValue("hello")
|
|
182
184
|
```
|
|
183
185
|
|
|
184
|
-
- `hittable()
|
|
185
|
-
- `scrollToVisible()
|
|
186
|
-
- `
|
|
186
|
+
- `hittable()`:当前能否点到(可见且未被挡住),用于排查“点了没反应”
|
|
187
|
+
- `scrollToVisible()`:只滚到可见、不点击;仅在你想先露出元素、稍后再操作时使用
|
|
188
|
+
- `clickCenter()` / `clickRandom()`:按坐标点击,**不会**自动滚动
|
|
187
189
|
|
|
188
190
|
### 点击
|
|
189
191
|
|
|
@@ -194,10 +196,10 @@ btn = (
|
|
|
194
196
|
.getOneNodeInfo(3000)
|
|
195
197
|
)
|
|
196
198
|
if btn:
|
|
197
|
-
btn.tap()
|
|
198
|
-
btn.doubleTap()
|
|
199
|
-
btn.press(800)
|
|
200
|
-
# btn.clickCenter()
|
|
199
|
+
btn.tap() # 不可见时自动滚到可见
|
|
200
|
+
btn.doubleTap() # 同上
|
|
201
|
+
btn.press(800) # 同上
|
|
202
|
+
# btn.clickCenter() # 坐标点击,不自动滚动
|
|
201
203
|
# btn.clickRandom()
|
|
202
204
|
```
|
|
203
205
|
|
|
@@ -205,13 +207,13 @@ if btn:
|
|
|
205
207
|
|
|
206
208
|
| 方法 | 说明 |
|
|
207
209
|
| --- | --- |
|
|
208
|
-
| `clearInput()` |
|
|
209
|
-
| `input(text)` |
|
|
210
|
-
| `setValue(text)` |
|
|
210
|
+
| `clearInput()` | 清空(内部先 `tap` 聚焦,不可见时也会自动滚到可见) |
|
|
211
|
+
| `input(text)` | 追加输入(内部先 `tap` 聚焦) |
|
|
212
|
+
| `setValue(text)` | 按类型设置;不可见时会先自动滚到可见 |
|
|
211
213
|
|
|
212
214
|
| 控件 | 传参 | 效果 |
|
|
213
215
|
| --- | --- | --- |
|
|
214
|
-
| `PickerWheel` | 选项文案,如 `"1小时"` |
|
|
216
|
+
| `PickerWheel` | 选项文案,如 `"1小时"` | 滚到该选项(控件本身不可见时也会先自动滚到可见) |
|
|
215
217
|
| 文本框类 | 字符串 | 追加输入,不先清空 |
|
|
216
218
|
|
|
217
219
|
```python
|
|
@@ -220,6 +222,7 @@ field.setValue("hello")
|
|
|
220
222
|
|
|
221
223
|
wheel = selector.type("XCUIElementTypePickerWheel").getOneNodeInfo(3000)
|
|
222
224
|
if wheel:
|
|
225
|
+
# 不可见时会自动滚到可见,再调到目标选项
|
|
223
226
|
wheel.setValue("1小时")
|
|
224
227
|
```
|
|
225
228
|
|