tdrpa.tdworker 1.2.13.3__py38-none-win_amd64.whl → 1.2.13.6__py38-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/_excel.pyi +27 -3
- tdrpa/tdworker/_os.pyi +1 -1
- tdrpa/tdworker/_web.pyi +88 -62
- tdrpa/tdworker.cp38-win_amd64.pyd +0 -0
- {tdrpa_tdworker-1.2.13.3.dist-info → tdrpa_tdworker-1.2.13.6.dist-info}/METADATA +1 -1
- {tdrpa_tdworker-1.2.13.3.dist-info → tdrpa_tdworker-1.2.13.6.dist-info}/RECORD +8 -8
- {tdrpa_tdworker-1.2.13.3.dist-info → tdrpa_tdworker-1.2.13.6.dist-info}/WHEEL +0 -0
- {tdrpa_tdworker-1.2.13.3.dist-info → tdrpa_tdworker-1.2.13.6.dist-info}/top_level.txt +0 -0
tdrpa/tdworker/_excel.pyi
CHANGED
@@ -434,16 +434,40 @@ class Excel:
|
|
434
434
|
:return:None
|
435
435
|
'''
|
436
436
|
@staticmethod
|
437
|
-
def
|
437
|
+
def GetCellColor(excelWorkBook, sheet: str | int = 'Sheet1', cell: str | list = 'A1') -> list | None:
|
438
438
|
'''
|
439
|
-
|
439
|
+
获取单元格背景颜色
|
440
|
+
|
441
|
+
Excel.GetCellColor(excelWorkBook, sheet="Sheet1", cell="A1")
|
442
|
+
|
443
|
+
:param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
|
444
|
+
:param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
|
445
|
+
:param cell:[可选参数]指定的单元格,支持单元格名如"A1"与行列列表如[行号,列号]两种格式,当使用单元格名时不区分大小写。默认"A1"
|
446
|
+
:return:返回单元格颜色的RGB颜色列表,如[255, 255, 255],无填充颜色返回None
|
447
|
+
'''
|
448
|
+
@staticmethod
|
449
|
+
def GetCellFontColor(excelWorkBook, sheet: str | int = 'Sheet1', cell: str | list = 'A1') -> list:
|
450
|
+
'''
|
451
|
+
获取单元格字体颜色
|
452
|
+
|
453
|
+
Excel.GetCellFontColor(excelWorkBook, sheet="Sheet1", cell="A1")
|
454
|
+
|
455
|
+
:param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
|
456
|
+
:param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
|
457
|
+
:param cell:[可选参数]指定的单元格,支持单元格名如"A1"与行列列表如[行号,列号]两种格式,当使用单元格名时不区分大小写。默认"A1"
|
458
|
+
:return:返回单元格字体颜色的RGB颜色列表,如[255, 255, 255]
|
459
|
+
'''
|
460
|
+
@staticmethod
|
461
|
+
def SetCellsColor(excelWorkBook, sheet: str | int = 'Sheet1', cells: str | list = 'A1', cellColor: str | list | None = [255, 255, 255], isSave: bool = False) -> None:
|
462
|
+
'''
|
463
|
+
设置单元格背景颜色
|
440
464
|
|
441
465
|
Excel.SetCellsColor(excelWorkBook, sheet="Sheet1", cells="A1", cellColor=[255, 255, 255], isSave=False)
|
442
466
|
|
443
467
|
:param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
|
444
468
|
:param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
|
445
469
|
:param cells:[可选参数]指定的单元格范围,支持单元格名如"A1"或"A1:B1"与行列列表如[行号, 列号]或[[行号, 列号], [行号, 列号]]四种格式,当使用单元格名时不区分大小写。默认"A1"
|
446
|
-
:param cellColor:[可选参数]列表形式的RGB颜色,如[255, 255, 255] 或 色卡字符串形式,如"#FFFFFF"
|
470
|
+
:param cellColor:[可选参数]列表形式的RGB颜色,如[255, 255, 255] 或 色卡字符串形式,如"#FFFFFF",字符串形式时不区分大小写。如果不填充颜色,则设置None值。默认[255, 255, 255]
|
447
471
|
:param isSave:[可选参数]操作完成立即保存。默认False
|
448
472
|
:return:None
|
449
473
|
'''
|
tdrpa/tdworker/_os.pyi
CHANGED
@@ -28,7 +28,7 @@ class App:
|
|
28
28
|
App.Run('''C:\\Windows\\system32\\mspaint.exe''')
|
29
29
|
|
30
30
|
:param exePath:[必选参数]应用程序文件路径
|
31
|
-
:param waitType:[可选参数]0
|
31
|
+
:param waitType:[可选参数]0:不等待 1:等待应用程序准备好 2:等待应用程序执行到退出。默认0
|
32
32
|
:param showType:[可选参数]程序启动后的显示样式(不一定生效) 0:隐藏 1:默认 3:最大化 6:最小化
|
33
33
|
:param mode:[可选参数]启动模式,0:常规模式启动, 1:增强模式启动。当常规模式启动后无法拾取元素时,可尝试增强模式启动。默认0
|
34
34
|
:return:返回应用程序的PID
|
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,33 @@ class Web:
|
|
282
282
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
283
283
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
284
284
|
:return: 网页元素的tdrpa_element_id,没有找到时返回None
|
285
|
-
|
285
|
+
"""
|
286
|
+
@staticmethod
|
287
|
+
def GetActiveElement(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
288
|
+
"""
|
289
|
+
获取焦点元素
|
290
|
+
|
291
|
+
tdrpa_element_id = Web.GetActiveElement(continueOnError=False, delayAfter=100, delayBefore=100)
|
292
|
+
|
293
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
294
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
295
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
296
|
+
:return: 返回焦点元素的tdrpa_element_id
|
297
|
+
"""
|
298
|
+
@staticmethod
|
299
|
+
def GetElementByXY(x: int = 0, y: int = 0, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
300
|
+
"""
|
301
|
+
根据坐标获取元素
|
302
|
+
|
303
|
+
tdrpa_element_id = Web.GetElementByXY(x=0, y=0, continueOnError=False, delayAfter=100, delayBefore=100)
|
304
|
+
|
305
|
+
:param x: [可选参数]元素的x坐标。默认0
|
306
|
+
:param y: [可选参数]元素的y坐标。默认0
|
307
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
308
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
309
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
310
|
+
:return: 返回元素的tdrpa_element_id
|
311
|
+
"""
|
286
312
|
@staticmethod
|
287
313
|
def GetTitle(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | None:
|
288
314
|
"""
|
@@ -309,7 +335,7 @@ class Web:
|
|
309
335
|
"""
|
310
336
|
@staticmethod
|
311
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:
|
312
|
-
|
338
|
+
"""
|
313
339
|
获取元素的文本值
|
314
340
|
|
315
341
|
text = Web.GetValue(target, onlyvis=False, index=None, fromElementTdid=None, getMode=\'auto\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -323,7 +349,7 @@ class Web:
|
|
323
349
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
324
350
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
325
351
|
:return: 网页元素的文本值
|
326
|
-
|
352
|
+
"""
|
327
353
|
@staticmethod
|
328
354
|
def GoBack(waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
329
355
|
"""
|
@@ -354,7 +380,7 @@ class Web:
|
|
354
380
|
"""
|
355
381
|
@staticmethod
|
356
382
|
def GoURL(url: str, waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
357
|
-
|
383
|
+
"""
|
358
384
|
跳转至新网址
|
359
385
|
|
360
386
|
goResult = Web.GoURL(\'https://www.baidu.com\', waitPage=True, delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -366,10 +392,10 @@ class Web:
|
|
366
392
|
:param delayAfter:[可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
367
393
|
:param delayBefore:[可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
368
394
|
:return: 跳转链接正确返回True,否则返回False
|
369
|
-
|
395
|
+
"""
|
370
396
|
@staticmethod
|
371
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:
|
372
|
-
|
398
|
+
"""
|
373
399
|
鼠标悬停到元素上
|
374
400
|
|
375
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)
|
@@ -391,10 +417,10 @@ class Web:
|
|
391
417
|
:param simulateType: [可选参数]模拟类型。"simulate":模拟悬浮,"api":接口悬浮。默认"simulate"
|
392
418
|
:param moveSmoothly: [可选参数]移动平滑(simulateType为api时会忽略此参数)。默认False。
|
393
419
|
:return: tdrpa_element_id
|
394
|
-
|
420
|
+
"""
|
395
421
|
@staticmethod
|
396
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:
|
397
|
-
|
423
|
+
"""
|
398
424
|
填写输入框
|
399
425
|
|
400
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)
|
@@ -417,7 +443,7 @@ class Web:
|
|
417
443
|
:param checkElementShow: [可选参数]是否检查元素是否在屏幕上。默认True
|
418
444
|
:param endToDo: [可选参数]输入完成后执行的操作。None:什么都不做。\'enter\':按回车键。\'blur\':使操作元素失去焦点。默认None
|
419
445
|
:return: tdrpa_element_id
|
420
|
-
|
446
|
+
"""
|
421
447
|
@staticmethod
|
422
448
|
def IsRunning(continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
423
449
|
"""
|
@@ -432,7 +458,7 @@ class Web:
|
|
432
458
|
"""
|
433
459
|
@staticmethod
|
434
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:
|
435
|
-
|
461
|
+
"""
|
436
462
|
将元素移动到屏幕中央
|
437
463
|
|
438
464
|
tdrpa_element_id = Web.MoveElementToScreen(target, onlyvis=False, index=None, fromElementTdid=None, moveMode=\'smoothCenter\', delayTime=10000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -447,7 +473,7 @@ class Web:
|
|
447
473
|
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
448
474
|
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
449
475
|
:return: tdrpa_element_id
|
450
|
-
|
476
|
+
"""
|
451
477
|
@staticmethod
|
452
478
|
def Refresh(waitPage: bool = True, delayTime: int = 60000, passCache: bool = False, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
453
479
|
"""
|
@@ -479,7 +505,7 @@ class Web:
|
|
479
505
|
"""
|
480
506
|
@staticmethod
|
481
507
|
def ScreenShot(imgPath: str, imgName: str, rect: Incomplete | None = None, continueOnError: bool = False, delayAfter: int = 300, delayBefore: int = 100) -> None:
|
482
|
-
|
508
|
+
"""
|
483
509
|
网页截图
|
484
510
|
|
485
511
|
Web.ScreenShot("d:/", "test.png", rect=None, continueOnError=False, delayAfter=300, delayBefore=100)
|
@@ -491,10 +517,10 @@ class Web:
|
|
491
517
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认300
|
492
518
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
493
519
|
:return:None
|
494
|
-
|
520
|
+
"""
|
495
521
|
@staticmethod
|
496
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:
|
497
|
-
|
523
|
+
"""
|
498
524
|
设置元素属性值
|
499
525
|
|
500
526
|
setResult = Web.SetAttribute(target, attrname, value, onlyvis=False, index=None, fromElementTdid=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -509,10 +535,10 @@ class Web:
|
|
509
535
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
510
536
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
511
537
|
:return: 设置成功返回True,否则返回False
|
512
|
-
|
538
|
+
"""
|
513
539
|
@staticmethod
|
514
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:
|
515
|
-
|
541
|
+
"""
|
516
542
|
设置元素勾选状态(radio或checkbox)
|
517
543
|
|
518
544
|
setResult = Web.SetCheck(target, onlyvis=False, index=None, fromElementTdid=None, isCheck=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -526,10 +552,10 @@ class Web:
|
|
526
552
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
527
553
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
528
554
|
:return: 设置成功返回True,否则返回False
|
529
|
-
|
555
|
+
"""
|
530
556
|
@staticmethod
|
531
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:
|
532
|
-
|
558
|
+
"""
|
533
559
|
设置元素焦点
|
534
560
|
|
535
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)
|
@@ -546,10 +572,10 @@ class Web:
|
|
546
572
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
547
573
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
548
574
|
:return: tdrpa_element_id
|
549
|
-
|
575
|
+
"""
|
550
576
|
@staticmethod
|
551
577
|
def SetScroll(scrollPostion: dict, smooth: bool = True, waitTime: int = 2000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> dict | None:
|
552
|
-
|
578
|
+
"""
|
553
579
|
设置滚动条位置(像素)
|
554
580
|
|
555
581
|
position = Web.SetScroll({"ScrollLeft": 0, "ScrollTop": 500}, smooth=True, waitTime=2000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -561,10 +587,10 @@ class Web:
|
|
561
587
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
562
588
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
563
589
|
:return:返回当前页面的滚动条位置 如{\'ScrollLeft\': 0, \'ScrollTop\': 0},没有则返回None
|
564
|
-
|
590
|
+
"""
|
565
591
|
@staticmethod
|
566
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:
|
567
|
-
|
593
|
+
"""
|
568
594
|
设置元素选中项(select)
|
569
595
|
|
570
596
|
Web.SetSelect(target, selected, onlyvis=False, index=None, fromElementTdid=None, selectMode="text", continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -579,10 +605,10 @@ class Web:
|
|
579
605
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
580
606
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
581
607
|
:return: None
|
582
|
-
|
608
|
+
"""
|
583
609
|
@staticmethod
|
584
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:
|
585
|
-
|
611
|
+
"""
|
586
612
|
设置元素的值
|
587
613
|
|
588
614
|
setResult = Web.SetValue(target, onlyvis=False, index=None, fromElementTdid=None, value=\'\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -596,7 +622,7 @@ class Web:
|
|
596
622
|
:param delayAfter: [可选参数]执行步骤后等待的时间(毫秒)。默认值为 100。
|
597
623
|
:param delayBefore: [可选参数]执行步骤前等待的时间(毫秒)。默认值为 100。
|
598
624
|
:return: 返回设置完成的值
|
599
|
-
|
625
|
+
"""
|
600
626
|
@staticmethod
|
601
627
|
def Stop(delayTime: int = 10000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 1000) -> bool | None:
|
602
628
|
"""
|
@@ -612,7 +638,7 @@ class Web:
|
|
612
638
|
"""
|
613
639
|
@staticmethod
|
614
640
|
def SwitchTab(matchTabContent: str = '', matchTabType: str = 'title', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool | None:
|
615
|
-
|
641
|
+
"""
|
616
642
|
切换浏览器标签页(可通过地址栏、标题栏进行匹配,支持包含匹配)
|
617
643
|
|
618
644
|
switchResult = Web.SwitchTab(\'百度\', matchTabType=\'title\', continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -623,7 +649,7 @@ class Web:
|
|
623
649
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
624
650
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
625
651
|
:return: 切换成功返回True,失败返回False
|
626
|
-
|
652
|
+
"""
|
627
653
|
@staticmethod
|
628
654
|
def SetWindowState(ChromeWinState: str = 'topmost', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
629
655
|
"""
|
@@ -639,7 +665,7 @@ class Web:
|
|
639
665
|
"""
|
640
666
|
@staticmethod
|
641
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:
|
642
|
-
|
668
|
+
"""
|
643
669
|
等待元素
|
644
670
|
|
645
671
|
tdrpa_element_id = Web.WaitElement(target, onlyvis=False, index=None, fromElementTdid=None, waitType=\'show\', delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -654,7 +680,7 @@ class Web:
|
|
654
680
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
655
681
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
656
682
|
:return:tdrpa_element_id
|
657
|
-
|
683
|
+
"""
|
658
684
|
@staticmethod
|
659
685
|
def WaitPage(delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100):
|
660
686
|
"""
|
@@ -712,7 +738,7 @@ class WebPW:
|
|
712
738
|
"""
|
713
739
|
@staticmethod
|
714
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:
|
715
|
-
|
741
|
+
"""
|
716
742
|
等待元素加载
|
717
743
|
|
718
744
|
WebPW.Wait(target, anchorsElement=None, waitType="show", delayTime=30000, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -726,7 +752,7 @@ class WebPW:
|
|
726
752
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
727
753
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
728
754
|
:return:None
|
729
|
-
|
755
|
+
"""
|
730
756
|
@staticmethod
|
731
757
|
def GetParentElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
732
758
|
"""
|
@@ -781,7 +807,7 @@ class WebPW:
|
|
781
807
|
"""
|
782
808
|
@staticmethod
|
783
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:
|
784
|
-
|
810
|
+
"""
|
785
811
|
点击元素
|
786
812
|
|
787
813
|
eh = WebPW.Click(target, button="left", clickType="click", anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -797,10 +823,10 @@ class WebPW:
|
|
797
823
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
798
824
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
799
825
|
:return: ElementHandle
|
800
|
-
|
826
|
+
"""
|
801
827
|
@staticmethod
|
802
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:
|
803
|
-
|
829
|
+
"""
|
804
830
|
鼠标悬停在元素上
|
805
831
|
|
806
832
|
eh = WebPW.Hover(target, anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -814,7 +840,7 @@ class WebPW:
|
|
814
840
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
815
841
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
816
842
|
:return: ElementHandle
|
817
|
-
|
843
|
+
"""
|
818
844
|
@staticmethod
|
819
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:
|
820
846
|
"""
|
@@ -874,7 +900,7 @@ class WebPW:
|
|
874
900
|
"""
|
875
901
|
@staticmethod
|
876
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:
|
877
|
-
|
903
|
+
"""
|
878
904
|
等待元素加载
|
879
905
|
|
880
906
|
WebPW.Wait(target, anchorsElement=None, waitType="show", delayTime=30000, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
|
@@ -888,7 +914,7 @@ class WebPW:
|
|
888
914
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
889
915
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
890
916
|
:return:None
|
891
|
-
|
917
|
+
"""
|
892
918
|
@staticmethod
|
893
919
|
def GetParentElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
|
894
920
|
"""
|
@@ -943,7 +969,7 @@ class WebPW:
|
|
943
969
|
"""
|
944
970
|
@staticmethod
|
945
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:
|
946
|
-
|
972
|
+
"""
|
947
973
|
点击元素
|
948
974
|
|
949
975
|
eh = WebPW.Click(target, button="left", clickType="click", anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -959,10 +985,10 @@ class WebPW:
|
|
959
985
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
960
986
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
961
987
|
:return: ElementHandle
|
962
|
-
|
988
|
+
"""
|
963
989
|
@staticmethod
|
964
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:
|
965
|
-
|
991
|
+
"""
|
966
992
|
鼠标悬停在元素上
|
967
993
|
|
968
994
|
eh = WebPW.Hover(target, anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
|
@@ -976,7 +1002,7 @@ class WebPW:
|
|
976
1002
|
:param delayAfter:[可选参数]执行后延时(毫秒)。默认100
|
977
1003
|
:param delayBefore:[可选参数]执行前延时(毫秒)。默认100
|
978
1004
|
:return: ElementHandle
|
979
|
-
|
1005
|
+
"""
|
980
1006
|
@staticmethod
|
981
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:
|
982
1008
|
"""
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
tdrpa/tdworker.cp38-win_amd64.pyd,sha256=
|
1
|
+
tdrpa/tdworker.cp38-win_amd64.pyd,sha256=R26a3sP_oSM3XoJJDjrDZS9D_Eoqga7gXVTkGvOcuz4,4091392
|
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
|
@@ -84,18 +84,18 @@ tdrpa/_tdxlwings/rest/api.py,sha256=yfv1VkTpjQOzxLh4aMnZQsh8wTRHg34KkyipKDa_w4g,
|
|
84
84
|
tdrpa/_tdxlwings/rest/serializers.py,sha256=ztMzL_EgbhAb3rSbfWFE2A9uyOykoZbkSoDHPeKXzGg,2885
|
85
85
|
tdrpa/tdworker/__init__.pyi,sha256=OPL-i23gzpfoL5a3pn2CmrWfq_IbQ4Yqb9o3K2r7Utw,483
|
86
86
|
tdrpa/tdworker/_clip.pyi,sha256=BkWLBBqyoRMTP-Tm_BP4cN4O8vNo5mYBYOEdexW1-UA,1500
|
87
|
-
tdrpa/tdworker/_excel.pyi,sha256=
|
87
|
+
tdrpa/tdworker/_excel.pyi,sha256=ZTtS3A4bW-vlZEGRZm3FtvG9zRU-n_aWRj1W1xLoBbM,67332
|
88
88
|
tdrpa/tdworker/_file.pyi,sha256=b36IttPYlerpvIE88csvoE7EUEQlDzTPnRCCnnGsAHI,3586
|
89
89
|
tdrpa/tdworker/_img.pyi,sha256=f1FZQYHSItcjbtQ09LrXrD7IzUXWpOfe7Tu-J-9heuk,26375
|
90
90
|
tdrpa/tdworker/_network.pyi,sha256=5f1sExKrr4X088C9xNXEi6hQIzP0jYN1buTb-2fDinA,4714
|
91
|
-
tdrpa/tdworker/_os.pyi,sha256=
|
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=r686OjWBa6KFVz2PIQHIGuj13L1U8YmvO2ALJiSF2Vg,78908
|
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.6.dist-info/METADATA,sha256=qePVDHrX_2-gad_yigRGXjK4thbNpXF8nhpq4zFM6iQ,962
|
99
|
+
tdrpa_tdworker-1.2.13.6.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
100
|
+
tdrpa_tdworker-1.2.13.6.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
|
101
|
+
tdrpa_tdworker-1.2.13.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|