tdrpa.tdworker 1.2.13.5__py311-none-win_amd64.whl → 1.2.13.7__py311-none-win_amd64.whl
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.
- tdrpa/tdworker/_web.pyi +76 -62
- tdrpa/tdworker.cp311-win_amd64.pyd +0 -0
- {tdrpa_tdworker-1.2.13.5.dist-info → tdrpa_tdworker-1.2.13.7.dist-info}/METADATA +1 -1
- {tdrpa_tdworker-1.2.13.5.dist-info → tdrpa_tdworker-1.2.13.7.dist-info}/RECORD +6 -6
- {tdrpa_tdworker-1.2.13.5.dist-info → tdrpa_tdworker-1.2.13.7.dist-info}/WHEEL +0 -0
- {tdrpa_tdworker-1.2.13.5.dist-info → tdrpa_tdworker-1.2.13.7.dist-info}/top_level.txt +0 -0
tdrpa/tdworker/_web.pyi
CHANGED
@@ -79,7 +79,7 @@ class Web:
|
|
79
79
|
"""
|
80
80
|
@staticmethod
|
81
81
|
def CreateTab(url: str = None, tabActive: bool = True, waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> int | None:
|
82
|
-
|
82
|
+
"""
|
83
83
|
新建标签页
|
84
84
|
|
85
85
|
urlResult = Web.CreateTab(url="https://www.baidu.com", tabActive=True, waitPage=True, delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -92,10 +92,10 @@ class Web:
|
|
92
92
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
93
93
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
94
94
|
:return:url是None时,返回None,url有具体链接时,返回True或False,代表是否打开了目标链接
|
95
|
-
|
95
|
+
"""
|
96
96
|
@staticmethod
|
97
97
|
def Exists(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, returnType: str = 'id', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | str | None:
|
98
|
-
|
98
|
+
"""
|
99
99
|
元素是否存在
|
100
100
|
|
101
101
|
tdrpa_element_id = Web.Exists(target, onlyvis=False, index=None, fromElementTdid=None, returnType=\'id\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -109,10 +109,10 @@ class Web:
|
|
109
109
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100。
|
110
110
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100。
|
111
111
|
:return:元素存在返回tdrpa_element_id或True,不存在返回None或False(返回类型根据returnType字段设置值而定)。
|
112
|
-
|
112
|
+
"""
|
113
113
|
@staticmethod
|
114
114
|
def GetAllElements(target: str | dict, onlyvis: bool = False, getMode: str = None, cssTargetFaster: bool = False, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> list | None:
|
115
|
-
|
115
|
+
"""
|
116
116
|
获取指定特征所有元素(tdrpa_element_id列表或指定模式的值列表)
|
117
117
|
|
118
118
|
tdrpa_elements = Web.GetAllElements(target, onlyvis=False, getMode=None, cssTargetFaster=False, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -125,10 +125,10 @@ class Web:
|
|
125
125
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100。
|
126
126
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100。
|
127
127
|
:return:所有目标元素的tdrpa_element_id列表 或 指定模式的值列表。
|
128
|
-
|
128
|
+
"""
|
129
129
|
@staticmethod
|
130
130
|
def GetAttribute(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, attrname: str | list | None = 'class', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None | dict:
|
131
|
-
|
131
|
+
"""
|
132
132
|
获取网页元素属性值
|
133
133
|
|
134
134
|
attrValue = Web.GetAttribute(target, onlyvis=False, index=None, fromElementTdid=None, attrname=\'class\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -142,10 +142,10 @@ class Web:
|
|
142
142
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100。
|
143
143
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100。
|
144
144
|
:return:属性值字符串或属性键值字典, 没有指定属性名时,其值是None
|
145
|
-
|
145
|
+
"""
|
146
146
|
@staticmethod
|
147
147
|
def GetCheck(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
148
|
-
|
148
|
+
"""
|
149
149
|
获取元素勾选状态(radio或checkbox)
|
150
150
|
|
151
151
|
isCheck = Web.GetCheck(target, onlyvis=False, index=None, fromElementTdid=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -158,10 +158,10 @@ class Web:
|
|
158
158
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
159
159
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
160
160
|
:return: 网页元素选中返回True,否则返回False
|
161
|
-
|
161
|
+
"""
|
162
162
|
@staticmethod
|
163
163
|
def GetChildren(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> list | None:
|
164
|
-
|
164
|
+
"""
|
165
165
|
获取子元素
|
166
166
|
|
167
167
|
tdrpa_element_ids = Web.GetChildren(target, onlyvis=False, index=None, fromElementTdid=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -174,7 +174,7 @@ class Web:
|
|
174
174
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
175
175
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
176
176
|
:return: 网页元素的子元素的tdrpa_element_id列表
|
177
|
-
|
177
|
+
"""
|
178
178
|
@staticmethod
|
179
179
|
def GetHTML(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
180
180
|
"""
|
@@ -189,7 +189,7 @@ class Web:
|
|
189
189
|
"""
|
190
190
|
@staticmethod
|
191
191
|
def GetParent(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, upLevels: int = 1, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
192
|
-
|
192
|
+
"""
|
193
193
|
获取父元素
|
194
194
|
|
195
195
|
tdrpa_element_id = Web.GetParent(target, onlyvis=False, index=None, fromElementTdid=None, upLevels=1, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -203,10 +203,10 @@ class Web:
|
|
203
203
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
204
204
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
205
205
|
:return: 网页元素的父元素的tdrpa_element_id,没有父元素时返回None
|
206
|
-
|
206
|
+
"""
|
207
207
|
@staticmethod
|
208
208
|
def GetRect(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, relative: str = 'screen', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> dict | None:
|
209
|
-
|
209
|
+
"""
|
210
210
|
获取元素位置大小
|
211
211
|
|
212
212
|
rectInfo = Web.GetRect(target, onlyvis=False, index=None, fromElementTdid=None, relative=\'screen\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -220,7 +220,7 @@ class Web:
|
|
220
220
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
221
221
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
222
222
|
:return: {\'x\':int, \'y\':int, \'width\':int, \'height\':int}
|
223
|
-
|
223
|
+
"""
|
224
224
|
@staticmethod
|
225
225
|
def GetScroll(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> dict | None:
|
226
226
|
"""
|
@@ -235,7 +235,7 @@ class Web:
|
|
235
235
|
"""
|
236
236
|
@staticmethod
|
237
237
|
def GetSelect(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, selectMode: str = 'text', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> list | None:
|
238
|
-
|
238
|
+
"""
|
239
239
|
获取元素选中项(select)
|
240
240
|
|
241
241
|
selectedList = Web.GetSelect(target, onlyvis=False, index=None, fromElementTdid=None, selectMode="text", continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -249,10 +249,10 @@ class Web:
|
|
249
249
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
250
250
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
251
251
|
:return: 网页元素的选中项的文本内容或值列表,没有选中项时返回空列表
|
252
|
-
|
252
|
+
"""
|
253
253
|
@staticmethod
|
254
254
|
def GetSibling(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, position: str = 'next', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
255
|
-
|
255
|
+
"""
|
256
256
|
获取兄弟元素
|
257
257
|
|
258
258
|
tdrpa_element_id = Web.GetSibling(target, onlyvis=False, index=None, fromElementTdid=None, position=\'next\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -266,10 +266,10 @@ class Web:
|
|
266
266
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
267
267
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
268
268
|
:return: 网页元素的兄弟元素的tdrpa_element_id,没有兄弟元素时返回None
|
269
|
-
|
269
|
+
"""
|
270
270
|
@staticmethod
|
271
271
|
def GetTdElementId(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
272
|
-
|
272
|
+
"""
|
273
273
|
获取元素tdrpa_element_id
|
274
274
|
|
275
275
|
tdrpa_element_id = Web.GetTdElementId(target, onlyvis=False, index=None, fromElementTdid=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -282,7 +282,7 @@ class Web:
|
|
282
282
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
283
283
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
284
284
|
:return: 网页元素的tdrpa_element_id,没有找到时返回None
|
285
|
-
|
285
|
+
"""
|
286
286
|
@staticmethod
|
287
287
|
def GetActiveElement(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
288
288
|
"""
|
@@ -296,6 +296,20 @@ class Web:
|
|
296
296
|
:return: 返回焦点元素的tdrpa_element_id
|
297
297
|
"""
|
298
298
|
@staticmethod
|
299
|
+
def GetElementByXY(x: int, y: int, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
300
|
+
"""
|
301
|
+
根据坐标获取元素
|
302
|
+
|
303
|
+
tdrpa_element_id = Web.GetElementByXY(x, y, continueOnError=False, delayAfter=100, delayBefore=100)
|
304
|
+
|
305
|
+
:param x: [必选参数]相对于浏览器视窗左边缘的距离,为非负整数。
|
306
|
+
:param y: [必选参数]相对于浏览器视窗顶部边缘的距离,为非负整数。
|
307
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
308
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
309
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
310
|
+
:return: 返回元素的tdrpa_element_id
|
311
|
+
"""
|
312
|
+
@staticmethod
|
299
313
|
def GetTitle(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
300
314
|
"""
|
301
315
|
获取网页标题
|
@@ -321,7 +335,7 @@ class Web:
|
|
321
335
|
"""
|
322
336
|
@staticmethod
|
323
337
|
def GetValue(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, getMode: str = 'auto', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
324
|
-
|
338
|
+
"""
|
325
339
|
获取元素的文本值
|
326
340
|
|
327
341
|
text = Web.GetValue(target, onlyvis=False, index=None, fromElementTdid=None, getMode=\'auto\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -335,7 +349,7 @@ class Web:
|
|
335
349
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
336
350
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
337
351
|
:return: 网页元素的文本值
|
338
|
-
|
352
|
+
"""
|
339
353
|
@staticmethod
|
340
354
|
def GoBack(waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
341
355
|
"""
|
@@ -366,7 +380,7 @@ class Web:
|
|
366
380
|
"""
|
367
381
|
@staticmethod
|
368
382
|
def GoURL(url: str, waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
369
|
-
|
383
|
+
"""
|
370
384
|
跳转至新网址
|
371
385
|
|
372
386
|
goResult = Web.GoURL(\'https://www.baidu.com\', waitPage=True, delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -378,10 +392,10 @@ class Web:
|
|
378
392
|
:param delayAfter:[可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
379
393
|
:param delayBefore:[可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
380
394
|
:return: 跳转链接正确返回True,否则返回False
|
381
|
-
|
395
|
+
"""
|
382
396
|
@staticmethod
|
383
397
|
def Hover(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, checkElementShow: bool = True, cursorPosition: str = 'center', cursorOffsetX: int = 0, cursorOffsetY: int = 0, keyModifiers: list = None, simulateType: str = 'simulate', moveSmoothly: bool = False) -> str | None:
|
384
|
-
|
398
|
+
"""
|
385
399
|
鼠标悬停到元素上
|
386
400
|
|
387
401
|
tdrpa_element_id = Web.Hover(target, onlyvis=False, index=None, fromElementTdid=None, delayTime=10000, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, checkElementShow=True, cursorPosition=\'center\', cursorOffsetX=0, cursorOffsetY=0, keyModifiers=None, simulateType=\'simulate\', moveSmoothly=False)
|
@@ -403,10 +417,10 @@ class Web:
|
|
403
417
|
:param simulateType: [可选参数]模拟类型。"simulate":模拟悬浮,"api":接口悬浮。默认"simulate"
|
404
418
|
:param moveSmoothly: [可选参数]移动平滑(simulateType为api时会忽略此参数)。默认False。
|
405
419
|
:return: tdrpa_element_id
|
406
|
-
|
420
|
+
"""
|
407
421
|
@staticmethod
|
408
422
|
def InputText(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, content: str = '', clearOldText: bool = True, inputInterval: int = 30, delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, validate: bool = False, simulateType: str = 'simulate', checkClickNum: int = 3, checkElementShow: bool = True, endToDo: str = None) -> str | None:
|
409
|
-
|
423
|
+
"""
|
410
424
|
填写输入框
|
411
425
|
|
412
426
|
tdrpa_element_id = Web.InputText(target, onlyvis=False, index=None, fromElementTdid=None, content=\'tdrpa\', clearOldText=True, inputInterval=30, delayTime=10000, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, validate=False, simulateType=\'simulate\', checkClickNum=3, checkElementShow=True, endToDo=None)
|
@@ -429,7 +443,7 @@ class Web:
|
|
429
443
|
:param checkElementShow: [可选参数]是否检查元素是否在屏幕上。默认True
|
430
444
|
:param endToDo: [可选参数]输入完成后执行的操作。None:什么都不做。\'enter\':按回车键。\'blur\':使操作元素失去焦点。默认None
|
431
445
|
:return: tdrpa_element_id
|
432
|
-
|
446
|
+
"""
|
433
447
|
@staticmethod
|
434
448
|
def IsRunning(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
435
449
|
"""
|
@@ -444,7 +458,7 @@ class Web:
|
|
444
458
|
"""
|
445
459
|
@staticmethod
|
446
460
|
def MoveElementToScreen(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, moveMode: str = 'smoothCenter', delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
447
|
-
|
461
|
+
"""
|
448
462
|
将元素移动到屏幕中央
|
449
463
|
|
450
464
|
tdrpa_element_id = Web.MoveElementToScreen(target, onlyvis=False, index=None, fromElementTdid=None, moveMode=\'smoothCenter\', delayTime=10000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -459,7 +473,7 @@ class Web:
|
|
459
473
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
460
474
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
461
475
|
:return: tdrpa_element_id
|
462
|
-
|
476
|
+
"""
|
463
477
|
@staticmethod
|
464
478
|
def Refresh(waitPage: bool = True, delayTime: int = 60000, passCache: bool = False, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
465
479
|
"""
|
@@ -491,7 +505,7 @@ class Web:
|
|
491
505
|
"""
|
492
506
|
@staticmethod
|
493
507
|
def ScreenShot(imgPath: str, imgName: str, rect: Incomplete | None = None, continueOnError: bool = False, delayAfter: int = 300, delayBefore: int = 100) -> None:
|
494
|
-
|
508
|
+
"""
|
495
509
|
网页截图
|
496
510
|
|
497
511
|
Web.ScreenShot("d:/", "test.png", rect=None, continueOnError=False, delayAfter=300, delayBefore=100)
|
@@ -503,10 +517,10 @@ class Web:
|
|
503
517
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认300
|
504
518
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
505
519
|
:return:None
|
506
|
-
|
520
|
+
"""
|
507
521
|
@staticmethod
|
508
522
|
def SetAttribute(target: str | dict, attrname: str, value: str, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
509
|
-
|
523
|
+
"""
|
510
524
|
设置元素属性值
|
511
525
|
|
512
526
|
setResult = Web.SetAttribute(target, attrname, value, onlyvis=False, index=None, fromElementTdid=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -521,10 +535,10 @@ class Web:
|
|
521
535
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
522
536
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
523
537
|
:return: 设置成功返回True,否则返回False
|
524
|
-
|
538
|
+
"""
|
525
539
|
@staticmethod
|
526
540
|
def SetCheck(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, isCheck: bool = True, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
527
|
-
|
541
|
+
"""
|
528
542
|
设置元素勾选状态(radio或checkbox)
|
529
543
|
|
530
544
|
setResult = Web.SetCheck(target, onlyvis=False, index=None, fromElementTdid=None, isCheck=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -538,10 +552,10 @@ class Web:
|
|
538
552
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
539
553
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
540
554
|
:return: 设置成功返回True,否则返回False
|
541
|
-
|
555
|
+
"""
|
542
556
|
@staticmethod
|
543
557
|
def SetFocus(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, setForeground: bool = True, checkElementShow: bool = True, focusMode: str = 'focus', delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
544
|
-
|
558
|
+
"""
|
545
559
|
设置元素焦点
|
546
560
|
|
547
561
|
tdrpa_element_id = Web.SetFocus(target, onlyvis=False, index=None, fromElementTdid=None, setForeground=True, checkElementShow=True, focusMode=\'focus\', delayTime=10000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -558,10 +572,10 @@ class Web:
|
|
558
572
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
559
573
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
560
574
|
:return: tdrpa_element_id
|
561
|
-
|
575
|
+
"""
|
562
576
|
@staticmethod
|
563
577
|
def SetScroll(scrollPostion: dict, smooth: bool = True, waitTime: int = 2000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> dict | None:
|
564
|
-
|
578
|
+
"""
|
565
579
|
设置滚动条位置(像素)
|
566
580
|
|
567
581
|
position = Web.SetScroll({"ScrollLeft": 0, "ScrollTop": 500}, smooth=True, waitTime=2000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -573,10 +587,10 @@ class Web:
|
|
573
587
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
574
588
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
575
589
|
:return:返回当前页面的滚动条位置 如{\'ScrollLeft\': 0, \'ScrollTop\': 0},没有则返回None
|
576
|
-
|
590
|
+
"""
|
577
591
|
@staticmethod
|
578
592
|
def SetSelect(target: str | dict, selected: str | list | int, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, selectMode: str = 'text', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
579
|
-
|
593
|
+
"""
|
580
594
|
设置元素选中项(select)
|
581
595
|
|
582
596
|
Web.SetSelect(target, selected, onlyvis=False, index=None, fromElementTdid=None, selectMode="text", continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -591,10 +605,10 @@ class Web:
|
|
591
605
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
592
606
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
593
607
|
:return: None
|
594
|
-
|
608
|
+
"""
|
595
609
|
@staticmethod
|
596
610
|
def SetValue(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, value: str = '', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
597
|
-
|
611
|
+
"""
|
598
612
|
设置元素的值
|
599
613
|
|
600
614
|
setResult = Web.SetValue(target, onlyvis=False, index=None, fromElementTdid=None, value=\'\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -608,7 +622,7 @@ class Web:
|
|
608
622
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
609
623
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
610
624
|
:return: 返回设置完成的值
|
611
|
-
|
625
|
+
"""
|
612
626
|
@staticmethod
|
613
627
|
def Stop(delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 1000) -> bool | None:
|
614
628
|
"""
|
@@ -624,7 +638,7 @@ class Web:
|
|
624
638
|
"""
|
625
639
|
@staticmethod
|
626
640
|
def SwitchTab(matchTabContent: str = '', matchTabType: str = 'title', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
627
|
-
|
641
|
+
"""
|
628
642
|
切换浏览器标签页(可通过地址栏、标题栏进行匹配,支持包含匹配)
|
629
643
|
|
630
644
|
switchResult = Web.SwitchTab(\'百度\', matchTabType=\'title\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -635,7 +649,7 @@ class Web:
|
|
635
649
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
636
650
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
637
651
|
:return: 切换成功返回True,失败返回False
|
638
|
-
|
652
|
+
"""
|
639
653
|
@staticmethod
|
640
654
|
def SetWindowState(ChromeWinState: str = 'topmost', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
641
655
|
"""
|
@@ -651,7 +665,7 @@ class Web:
|
|
651
665
|
"""
|
652
666
|
@staticmethod
|
653
667
|
def WaitElement(target: str | dict, onlyvis: bool = False, index: int = None, fromElementTdid: str = None, waitType: str = 'show', delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
654
|
-
|
668
|
+
"""
|
655
669
|
等待元素
|
656
670
|
|
657
671
|
tdrpa_element_id = Web.WaitElement(target, onlyvis=False, index=None, fromElementTdid=None, waitType=\'show\', delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -666,7 +680,7 @@ class Web:
|
|
666
680
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
667
681
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
668
682
|
:return:tdrpa_element_id
|
669
|
-
|
683
|
+
"""
|
670
684
|
@staticmethod
|
671
685
|
def WaitPage(delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
672
686
|
"""
|
@@ -724,7 +738,7 @@ class WebPW:
|
|
724
738
|
"""
|
725
739
|
@staticmethod
|
726
740
|
def Wait(target: str, anchorsElement: ElementHandle = None, waitType: str = 'show', delayTime: int = 30000, isVisible: bool = True, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
727
|
-
|
741
|
+
"""
|
728
742
|
等待元素加载
|
729
743
|
|
730
744
|
WebPW.Wait(target, anchorsElement=None, waitType="show", delayTime=30000, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -738,7 +752,7 @@ class WebPW:
|
|
738
752
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
739
753
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
740
754
|
:return:None
|
741
|
-
|
755
|
+
"""
|
742
756
|
@staticmethod
|
743
757
|
def GetParentElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
744
758
|
"""
|
@@ -793,7 +807,7 @@ class WebPW:
|
|
793
807
|
"""
|
794
808
|
@staticmethod
|
795
809
|
def Click(target: str | ElementHandle, button: str = 'left', clickType: str = 'click', anchorsElement: ElementHandle = None, continueOnError: bool = False, position: dict = None, keyModifiers: list = None, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
796
|
-
|
810
|
+
"""
|
797
811
|
点击元素
|
798
812
|
|
799
813
|
eh = WebPW.Click(target, button="left", clickType="click", anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -809,10 +823,10 @@ class WebPW:
|
|
809
823
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
810
824
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
811
825
|
:return: ElementHandle
|
812
|
-
|
826
|
+
"""
|
813
827
|
@staticmethod
|
814
828
|
def Hover(target: str | ElementHandle, anchorsElement: ElementHandle = None, continueOnError: bool = False, position: dict = None, keyModifiers: list = None, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
815
|
-
|
829
|
+
"""
|
816
830
|
鼠标悬停在元素上
|
817
831
|
|
818
832
|
eh = WebPW.Hover(target, anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -826,7 +840,7 @@ class WebPW:
|
|
826
840
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
827
841
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
828
842
|
:return: ElementHandle
|
829
|
-
|
843
|
+
"""
|
830
844
|
@staticmethod
|
831
845
|
def Input(text: str, target: str | ElementHandle, anchorsElement: ElementHandle = None, continueOnError: bool = False, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
832
846
|
"""
|
@@ -886,7 +900,7 @@ class WebPW:
|
|
886
900
|
"""
|
887
901
|
@staticmethod
|
888
902
|
def Wait(target: str, anchorsElement: ElementHandle = None, waitType: str = 'show', delayTime: int = 30000, isVisible: bool = True, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
889
|
-
|
903
|
+
"""
|
890
904
|
等待元素加载
|
891
905
|
|
892
906
|
WebPW.Wait(target, anchorsElement=None, waitType="show", delayTime=30000, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -900,7 +914,7 @@ class WebPW:
|
|
900
914
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
901
915
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
902
916
|
:return:None
|
903
|
-
|
917
|
+
"""
|
904
918
|
@staticmethod
|
905
919
|
def GetParentElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
906
920
|
"""
|
@@ -955,7 +969,7 @@ class WebPW:
|
|
955
969
|
"""
|
956
970
|
@staticmethod
|
957
971
|
def Click(target: str | ElementHandle, button: str = 'left', clickType: str = 'click', anchorsElement: ElementHandle = None, continueOnError: bool = False, position: dict = None, keyModifiers: list = None, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
958
|
-
|
972
|
+
"""
|
959
973
|
点击元素
|
960
974
|
|
961
975
|
eh = WebPW.Click(target, button="left", clickType="click", anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -971,10 +985,10 @@ class WebPW:
|
|
971
985
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
972
986
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
973
987
|
:return: ElementHandle
|
974
|
-
|
988
|
+
"""
|
975
989
|
@staticmethod
|
976
990
|
def Hover(target: str | ElementHandle, anchorsElement: ElementHandle = None, continueOnError: bool = False, position: dict = None, keyModifiers: list = None, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
977
|
-
|
991
|
+
"""
|
978
992
|
鼠标悬停在元素上
|
979
993
|
|
980
994
|
eh = WebPW.Hover(target, anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -988,7 +1002,7 @@ class WebPW:
|
|
988
1002
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
989
1003
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
990
1004
|
:return: ElementHandle
|
991
|
-
|
1005
|
+
"""
|
992
1006
|
@staticmethod
|
993
1007
|
def Input(text: str, target: str | ElementHandle, anchorsElement: ElementHandle = None, continueOnError: bool = False, delayTime: int = 10000, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
994
1008
|
"""
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
tdrpa/tdworker.cp311-win_amd64.pyd,sha256=
|
1
|
+
tdrpa/tdworker.cp311-win_amd64.pyd,sha256=svaH40L4fLbHPzzYX5eJfjDB0Xq3bvKZn15gTjiB-Gg,4956672
|
2
2
|
tdrpa/_tdxlwings/__init__.py,sha256=mxmqGWQ7xFb6e1GqkKEBfMQtZ8YyO4kAcPOvcJnD_2k,4424
|
3
3
|
tdrpa/_tdxlwings/_win32patch.py,sha256=_IxTfvj663osTXh8b1S-A_N4PthS9gEWFLjpY4V0iUA,3443
|
4
4
|
tdrpa/_tdxlwings/_xlmac.py,sha256=23OusKchbqglFi1s909tbB9fIwoFj6Yny4GiYrsnx5s,68521
|
@@ -91,11 +91,11 @@ tdrpa/tdworker/_network.pyi,sha256=5f1sExKrr4X088C9xNXEi6hQIzP0jYN1buTb-2fDinA,4
|
|
91
91
|
tdrpa/tdworker/_os.pyi,sha256=GfuBMRR3cEOkmq6UPDi21dZxfdWAPY8tvXtonSX2NaE,2277
|
92
92
|
tdrpa/tdworker/_sp.pyi,sha256=OwKyMzbxhTvjXcHBx-w_6et1hdlJTPyHMpC8DHjWW4Q,635
|
93
93
|
tdrpa/tdworker/_w.pyi,sha256=ZwyIk5cLv8Rd0KpshdZSJ9EIN0XYMHYCARw31pvrzys,5229
|
94
|
-
tdrpa/tdworker/_web.pyi,sha256=
|
94
|
+
tdrpa/tdworker/_web.pyi,sha256=SVB3SeooREHXWb6c6yrIRslaSv8fgG3MTwFZxIP7uoo,78973
|
95
95
|
tdrpa/tdworker/_winE.pyi,sha256=s5IHyB4zLyshyvcPEEjaY-Vdyy02E1fnECASzXUsFZY,17557
|
96
96
|
tdrpa/tdworker/_winK.pyi,sha256=lH1_smTsfHQVDaREOy37cb1Ied8zlKo6Q20oc1GXBGc,5407
|
97
97
|
tdrpa/tdworker/_winM.pyi,sha256=E_PJm6cLgpkqy7fcD6CMNlSS31xVmE1N31DP1Cj47yI,7938
|
98
|
-
tdrpa_tdworker-1.2.13.
|
99
|
-
tdrpa_tdworker-1.2.13.
|
100
|
-
tdrpa_tdworker-1.2.13.
|
101
|
-
tdrpa_tdworker-1.2.13.
|
98
|
+
tdrpa_tdworker-1.2.13.7.dist-info/METADATA,sha256=SevkbwOP4MhzhLFmfmnRpNt0ytgqs7ra68qsja5RcZM,1163
|
99
|
+
tdrpa_tdworker-1.2.13.7.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
100
|
+
tdrpa_tdworker-1.2.13.7.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
|
101
|
+
tdrpa_tdworker-1.2.13.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|