tdrpa.tdworker 1.2.12.6__py311-none-win_amd64.whl → 1.2.13.0__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.
@@ -1,6 +1,8 @@
1
1
  from ._clip import Clipboard as Clipboard
2
2
  from ._excel import Excel as Excel
3
+ from ._file import INI as INI
3
4
  from ._img import Image as Image
5
+ from ._network import Http as Http, Mail as Mail
4
6
  from ._os import App as App
5
7
  from ._sp import PrintToScreen as PrintToScreen
6
8
  from ._w import Window as Window
tdrpa/tdworker/_clip.pyi CHANGED
@@ -2,49 +2,49 @@ class Clipboard:
2
2
  @staticmethod
3
3
  def GetText():
4
4
  """
5
- 获取剪贴板文本
5
+ 读取剪贴板文本
6
6
 
7
7
  Clipboard.GetText()
8
8
 
9
- :return:剪切板的文本内容
9
+ :return:剪贴板的文本内容
10
10
  """
11
11
  @staticmethod
12
- def SetText(content: str = ''):
12
+ def SaveImage(savePath: str):
13
13
  '''
14
- 设置剪贴板文本
14
+ 保存剪贴板图像
15
15
 
16
- Clipboard.SetText(\'\')
16
+ Clipboard.SaveImage(savePath)
17
17
 
18
- :param content:[必选参数]新的剪贴板文本内容,默认""
19
- :return:成功返回True,失败返回False
18
+ :param savePath:[必选参数]要将剪贴板的图像保存到的文件路径,如"D:\\1.png"
19
+ :return:图像保存成功返回True,保存失败返回False
20
20
  '''
21
21
  @staticmethod
22
- def SetImage(picPath):
23
- """
24
- 把图片放入剪贴板
22
+ def SetFile(paths: str | list):
23
+ '''
24
+ 文件设置到剪贴板
25
25
 
26
- Clipboard.SetText(picPath)
26
+ Clipboard.SetFile(paths)
27
27
 
28
- :param picPath:[必选参数]图片的路径
28
+ :param paths:[必选参数]文件的路径,单个文件用字符串类型,如"D:\x01.txt",多个文件用 list 类型,其中每个元素用字符串,如["D:\x01.txt", "D:\x01.png"]
29
29
  :return:成功返回True,失败返回False
30
- """
30
+ '''
31
31
  @staticmethod
32
- def SaveImage(savePath: str):
33
- """
34
- 将剪贴板中的图片保存到文件
32
+ def SetImage(picPath):
33
+ '''
34
+ 图片设置到剪贴板
35
35
 
36
- Clipboard.SaveImage(savePath)
36
+ Clipboard.SetImage(picPath)
37
37
 
38
- :param savePath:[必选参数]需要保存的文件路径
39
- :return:保存成功返回True,保存失败返回False
40
- """
38
+ :param picPath:[必选参数]要放入剪贴板的图片路径,如"D:\\1.png"
39
+ :return:成功返回True,失败返回False
40
+ '''
41
41
  @staticmethod
42
- def SetFile(paths: str | list):
43
- """
44
- 把文件放入剪贴板
42
+ def SetText(content: str = ''):
43
+ '''
44
+ 设置剪贴板文本
45
45
 
46
- Clipboard.SetFile(filePath)
46
+ Clipboard.SetText(\'\')
47
47
 
48
- :param paths:[必选参数]文件的路径,单个文件用字符串,多个文件用list类型,其中每个元素用字符串
48
+ :param content:[必选参数]新的剪贴板文本内容,默认""
49
49
  :return:成功返回True,失败返回False
50
- """
50
+ '''
tdrpa/tdworker/_excel.pyi CHANGED
@@ -99,6 +99,46 @@ class Excel:
99
99
  :return:指定单元格的值
100
100
  '''
101
101
  @staticmethod
102
+ def ReadFormula(excelWorkBook, sheet: str | int = 'Sheet1', cell: str | list = 'A1'):
103
+ '''
104
+ 读取单元格公式
105
+
106
+ cellFormula = Excel.ReadFormula(excelWorkBook, sheet="Sheet1", cell="A1")
107
+
108
+ :param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
109
+ :param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
110
+ :param cell:[可选参数]指定的单元格,支持单元格名如"A1"与行列列表如[行号,列号]两种格式,当使用单元格名时不区分大小写。默认"A1"
111
+ :return:指定单元格的公式
112
+ '''
113
+ @staticmethod
114
+ def WriteFormula(excelWorkBook, sheet: str | int = 'Sheet1', cell: str | list = 'A1', formula: str = ''):
115
+ '''
116
+ 写入单元格公式
117
+
118
+ Excel.WriteFormula(excelWorkBook, sheet="Sheet1", cell="A1", formula="=A1+B1")
119
+
120
+ :param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
121
+ :param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
122
+ :param cell:[可选参数]指定的单元格,支持单元格名如"A1"与行列列表如[行号,列号]两种格式,当使用单元格名时不区分大小写。默认"A1"
123
+ :param formula:[可选参数]需要写入的公式。默认""
124
+ :return:None
125
+ '''
126
+ @staticmethod
127
+ def WriteHyperlink(excelWorkBook, sheet: str | int = 'Sheet1', cell: str | list = 'A1', url: str = '', textToDisplay: str = '', screenTip: str = ''):
128
+ '''
129
+ 写入单元格超链接
130
+
131
+ Excel.WriteHyperlink(excelWorkBook, sheet="Sheet1", cell="A1", url="www.baidu.com", textToDisplay = "", screenTip = "")
132
+
133
+ :param excelWorkBook:[必选参数]使用 "打开Excel工作簿"命令(Excel.OpenExcel) 或 "绑定Excel工作簿" 命令(Excel.BindBook)返回的工作簿对象
134
+ :param sheet:[可选参数]如果使用字符串,则表示指定工作表的名字;使用数字,则表示指定工作表的顺序(例如:0、1、2代表从左边开始正数第1、2、3个工作表;-1、-2、-3代表从右边开始倒数第1、2、3个工作表)。默认"Sheet1"
135
+ :param cell:[可选参数]指定的单元格,支持单元格名如"A1"与行列列表如[行号,列号]两种格式,当使用单元格名时不区分大小写。默认"A1"
136
+ :param url:[可选参数]超链接的URL。默认""
137
+ :param textToDisplay:[可选参数]超链接的显示字符串。默认""
138
+ :param screenTip:[可选参数]当鼠标停留在超链接上方是显示的屏幕提示。默认""
139
+ :return:None
140
+ '''
141
+ @staticmethod
102
142
  def ReadRange(excelWorkBook, sheet: str | int = 'Sheet1', cells: str | list = 'A1:B2', retStr: bool = False, excludeEndBlankRows: bool = False, excludeEndBlankColums: bool = False) -> list:
103
143
  '''
104
144
  读取区域
@@ -0,0 +1,77 @@
1
+ class INI:
2
+ @staticmethod
3
+ def Read(iniPath: str, sectionName: str, keyName: str, defaultValue: str = '', encoding: str = 'GBK') -> str:
4
+ """
5
+ 读键值
6
+
7
+ value = INI.Read('D:\\conf.ini','section1', 'key1', defaultValue='', encoding='GBK')
8
+
9
+ :param iniPath:[必选参数]INI 配置文件所在路径
10
+ :param sectionName:[必选参数]要访问 INI 配置文件的小节名字
11
+ :param keyName:[必选参数]要访问 INI 配置文件的键名
12
+ :param defaultValue:[可选参数]当 INI 配置文件键名不存在时,返回的默认内容。默认是空字符串
13
+ :param encoding:[可选参数]文件编码。默认 GBK
14
+ :return: 返回读取的值,字符串类型
15
+ """
16
+ @staticmethod
17
+ def Write(iniPath: str, sectionName: str, keyName: str, value, encoding: str = 'GBK') -> None:
18
+ """
19
+ 写键值
20
+
21
+ INI.Write('D:\\conf.ini','section1', 'key1', 'value1', encoding='GBK')
22
+
23
+ :param iniPath:[必选参数]INI 配置文件所在路径
24
+ :param sectionName:[必选参数]要访问 INI 配置文件的小节名字
25
+ :param keyName:[必选参数]INI 文件中被写入的键值对中的键名,若为空字符串,则此键值对不被写入
26
+ :param value:[必选参数]INI 文件中被写入的键值对中的键值
27
+ :param encoding:[可选参数]文件编码。默认 GBK
28
+ :return: None
29
+ """
30
+ @staticmethod
31
+ def EnumSection(iniPath: str, encoding: str = 'GBK') -> list:
32
+ """
33
+ 枚举小节
34
+
35
+ sections = INI.EnumSection('D:\\conf.ini', encoding='GBK')
36
+
37
+ :param iniPath:[必选参数]INI 配置文件所在路径
38
+ :param encoding:[可选参数]文件编码。默认 GBK
39
+ :return: 返回一个列表,列表中每个元素为一个section的名字
40
+ """
41
+ @staticmethod
42
+ def EnumKey(iniPath: str, sectionName: str, encoding: str = 'GBK') -> list:
43
+ """
44
+ 枚举键
45
+
46
+ keys = INI.EnumKey('D:\\conf.ini', 'section1', encoding='GBK')
47
+
48
+ :param iniPath:[必选参数]INI 配置文件所在路径
49
+ :param sectionName:[必选参数]要访问 INI 配置文件的小节名字
50
+ :param encoding:[可选参数]文件编码。默认 GBK
51
+ :return: 返回一个列表,列表中每个元素为一个key的名字
52
+ """
53
+ @staticmethod
54
+ def DeleteSection(iniPath: str, sectionName: str, encoding: str = 'GBK') -> None:
55
+ """
56
+ 删除小节
57
+
58
+ INI.DeleteSection('D:\\conf.ini','section1', encoding='GBK')
59
+
60
+ :param iniPath:[必选参数]INI 配置文件所在路径
61
+ :param sectionName:[必选参数]要访问 INI 配置文件的小节名字
62
+ :param encoding:[可选参数]文件编码。默认 GBK
63
+ :return: None
64
+ """
65
+ @staticmethod
66
+ def DeleteKey(iniPath: str, sectionName: str, keyName: str, encoding: str = 'GBK'):
67
+ """
68
+ 删除键
69
+
70
+ INI.DeleteKey('D:\\conf.ini','section1', 'key1', encoding='GBK')
71
+
72
+ :param iniPath:[必选参数]INI 配置文件所在路径
73
+ :param sectionName:[必选参数]要访问 INI 配置文件的小节名字
74
+ :param keyName:[必选参数]要访问 INI 配置文件的键名
75
+ :param encoding:[可选参数]文件编码。默认 GBK
76
+ :return: None
77
+ """
@@ -0,0 +1,94 @@
1
+ class Mail:
2
+ @staticmethod
3
+ def SendMail(user: str = '', pwd: str = '', sender: str = '', title: str = '', content: str = '', to: str | list = '', cc: str | list = None, attr: str | list = None, server: str = 'smtp.qq.com', port: int = 465, ssl: bool = True, timeout: int = 10, continueOnError: bool = False):
4
+ '''
5
+ 发送邮件
6
+
7
+ Mail.SendMail(user=\'\', pwd=\'\', sender=\'\', title=\'\', content=\'\', to=\'\', cc=None, attr=None, server="smtp.qq.com", port=465, ssl=True, timeout=10, continueOnError=False)
8
+
9
+ :param user: [必选参数]邮箱登录帐号,比如普通QQ邮箱的登录帐号与邮箱地址相同
10
+ :param pwd: [必选参数]登录密码
11
+ :param sender: [必选参数]发件人邮箱地址
12
+ :param title: [必选参数]邮件的标题
13
+ :param content: [必选参数]邮件正文内容,支持HTML类型的正文内容
14
+ :param to: [必选参数]收件人邮箱地址,多个地址可用["xxx@qq.com","xxx@163.com"]列表的形式填写, 也可以是单个邮箱地址字符串
15
+ :param cc: [可选参数]抄送邮箱地址,多个地址可用["xxx@qq.com","xxx@163.com"]列表的形式填写, 也可以是单个邮箱地址字符串, None:不需要抄送,默认None
16
+ :param attr: [可选参数]邮件附件,多个附件可以用["附件一路径","附件二路径"]列表的形式填写,也可以是单个附件路径字符串, None:不需要附件,默认None
17
+ :param server: [可选参数]SMTP服务器地址,默认smtp.qq.com
18
+ :param port: [可选参数]SMTP服务器端口,常见为 25、465、587,默认465
19
+ :param ssl: [可选参数]是否使用SSL协议加密,True为使用,False为不使用,默认True
20
+ :param timeout: [可选参数]超时时间(秒),默认10
21
+ :param continueOnError: [可选参数]发生错误是否继续,True为继续,False为不继续。默认False
22
+ :return:None
23
+ '''
24
+
25
+ class Http:
26
+ @staticmethod
27
+ def SetCookies(cookies: dict = None) -> None:
28
+ '''
29
+ 设置cookies
30
+
31
+ Http.SetCookies(None)
32
+
33
+ :param cookies:[可选参数]字典类型的cookies,例如:{"name":"value","name2":"value2"},默认None
34
+ :return:None
35
+ '''
36
+ @staticmethod
37
+ def SetHeaders(headers: dict = None) -> None:
38
+ '''
39
+ 设置Headers
40
+
41
+ Http.SetHeaders(None)
42
+
43
+ :param headers:[可选参数]字典类型的请求头,例如:{"name":"value","name2":"value2"},默认None
44
+ :return:None
45
+ '''
46
+ @staticmethod
47
+ def Get(url: str, form: str | dict = None, delayTime: int = 60000) -> str:
48
+ '''
49
+ Get获取数据
50
+
51
+ text = HTTP.Get("", None, 60000)
52
+
53
+ :param url:[必选参数]Get页面的链接地址
54
+ :param form:[可选参数]Get时传递的表单数据,可以是字符串或字典,默认None
55
+ :param delayTime:[可选参数]超时时间,单位毫秒,默认60000毫秒
56
+ :return:获取的网络数据的结果
57
+ '''
58
+ @staticmethod
59
+ def Post(url: str, form: str | dict = None, delayTime: int = 60000) -> str:
60
+ '''
61
+ Post提交表单
62
+
63
+ text = HTTP.Post("", None, 60000)
64
+
65
+ :param url:[必选参数]Post页面的链接地址
66
+ :param form:[可选参数]Post时传递的表单数据,可以是字符串或字典,默认None
67
+ :param delayTime:[可选参数]超时时间,单位毫秒,默认60000毫秒
68
+ :return:向网页提交表单的结果
69
+ '''
70
+ @staticmethod
71
+ def PostJson(url: str, form: str | dict = None, delayTime: int = 60000) -> str:
72
+ '''
73
+ Post提交JSON表单
74
+
75
+ text = HTTP.PostJson("", None, 60000)
76
+
77
+ :param url:[必选参数]Post页面的链接地址
78
+ :param form:[可选参数]Post时传递的表单数据,可以是字符串或字典,默认None
79
+ :param delayTime:[可选参数]超时时间,单位毫秒,默认60000毫秒
80
+ :return:向网页提交JSON表单的结果
81
+ '''
82
+ @staticmethod
83
+ def GetFile(url: str, file: str, form: str | dict = None, delayTime: int = 60000) -> bool:
84
+ '''
85
+ Get下载文件
86
+
87
+ result = Http.GetFile("","",None,60000)
88
+
89
+ :param url:[必选参数]下载文件的链接地址
90
+ :param file:[必选参数]保存的文件路径
91
+ :param form:[可选参数]Get时传递的表单数据,可以是字符串或字典,默认None
92
+ :param delayTime:[可选参数]超时时间,单位毫秒,默认60000毫秒
93
+ :return:是否下载成功
94
+ '''
tdrpa/tdworker/_web.pyi CHANGED
@@ -56,11 +56,11 @@ class Web:
56
56
  :return: 关闭成功返回True,失败返回False。只有一个标签页时不能关闭,会返回False
57
57
  """
58
58
  @staticmethod
59
- def CreateBrowser(url: str = None, chromeExePath: str = None, isMaximize: bool = True, supportMode: str = 'web', userData: str = None, clearChrome: bool = True, otherStartupParam: Incomplete | None = None, waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
59
+ def CreateBrowser(url: str = None, chromeExePath: str = None, isMaximize: bool = True, supportMode: str = 'web', userData: str = None, clearChrome: bool = True, otherStartupParam: Incomplete | None = None, waitPage: bool = True, delayTime: int = 60000, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, debugPort: int = 9222) -> None:
60
60
  """
61
61
  创建浏览器
62
62
 
63
- Web.CreateBrowser(url='https://www.baidu.com', chromeExePath=None, isMaximize=True, supportMode='web', userData=None, clearChrome=True, otherStartupParam=None, waitPage=True, delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100)
63
+ Web.CreateBrowser(url='https://www.baidu.com', chromeExePath=None, isMaximize=True, supportMode='web', userData=None, clearChrome=True, otherStartupParam=None, waitPage=True, delayTime=60000, continueOnError=False, delayAfter=100, delayBefore=100, debugPort=9222)
64
64
 
65
65
  :param url:[可选参数]启动浏览器后打开的链接,字符串类型。默认None
66
66
  :param chromeExePath:[可选参数]谷歌浏览器可执行程序的绝对路径,字符串类型,填写None时会自动寻找本地安装的路径。默认None
@@ -74,6 +74,7 @@ class Web:
74
74
  :param continueOnError:[可选参数]错误继续执行。默认False
75
75
  :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
76
76
  :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
77
+ :param debugPort:[可选参数]调试端口。默认9222
77
78
  :return:None
78
79
  """
79
80
  @staticmethod
@@ -125,6 +126,7 @@ class Web:
125
126
  :param delayBefore:[可选参数]执行前延时(毫秒)。默认100。
126
127
  :return:所有目标元素的tdrpa_element_id列表 或 指定模式的值列表。
127
128
  '''
129
+ @staticmethod
128
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:
129
131
  '''
130
132
  获取网页元素属性值
@@ -820,6 +822,168 @@ class WebPW:
820
822
 
821
823
  eh = WebPW.Input(text, target, anchorsElement=None, continueOnError=False, delayTime=10000, delayAfter=100, delayBefore=100)
822
824
 
825
+ :param text:[必选参数]文本内容
826
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串 或 ElementHandle
827
+ :param anchorsElement:[可选参数]锚点元素,默认None
828
+ :param continueOnError:[可选参数]错误继续执行。默认False
829
+ :param delayTime:超时(豪秒)。默认10000
830
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
831
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
832
+ :return: ElementHandle
833
+ """
834
+
835
+ @staticmethod
836
+ def GetActivePage(delayTime: int = 10000, continueOnError: bool = False) -> Page:
837
+ """
838
+ 获取当前激活的页面
839
+
840
+ page = WebPW.GetActivePage(delayTime=10000, continueOnError=False)
841
+
842
+ :param delayTime: 查找延时(豪秒)。默认10000
843
+ :param continueOnError: 错误继续执行。默认False
844
+ :return: Page
845
+ """
846
+ @staticmethod
847
+ def FindWebElement(target: str, anchorsElement: ElementHandle = None, delayTime: int = 10000, continueOnError: bool = False, isVisible: bool = True) -> ElementHandle:
848
+ """
849
+ 查找元素
850
+
851
+ eh = WebPW.FindWebElement(target, anchorsElement=None, delayTime=10000, continueOnError=False, isVisible=True)
852
+
853
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串
854
+ :param anchorsElement:[可选参数]锚点元素,默认None
855
+ :param delayTime: 查找延时(豪秒)。默认10000
856
+ :param continueOnError: 错误继续执行。默认False
857
+ :param isVisible:检查是否可见。默认True
858
+ :return: ElementHandle
859
+ """
860
+ @staticmethod
861
+ def Exists(target: str, anchorsElement: ElementHandle = None, isVisible: bool = True, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool:
862
+ """
863
+ 元素是否存在(不可见归于不存在)
864
+
865
+ WebPW.Exists(target, anchorsElement=None, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
866
+
867
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串
868
+ :param anchorsElement:[可选参数]锚点元素,默认None
869
+ :param isVisible:[可选参数]检查是否可见。默认True
870
+ :param continueOnError:[可选参数]错误继续执行。默认False
871
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
872
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
873
+ :return:存在返回True,不存在返回False
874
+ """
875
+ @staticmethod
876
+ 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
+ '''
878
+ 等待元素加载
879
+
880
+ WebPW.Wait(target, anchorsElement=None, waitType="show", delayTime=30000, isVisible=True, continueOnError=False, delayAfter=100, delayBefore=100)
881
+
882
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串
883
+ :param anchorsElement:[可选参数]锚点元素,默认None
884
+ :param waitType:[可选参数]等待方式。 等待显示:"show" 等待消失:"hide"。默认"show"
885
+ :param delayTime:[可选参数]等待最大时间。默认30000毫秒(30秒)
886
+ :param isVisible:[可选参数]检查是否可见。默认True
887
+ :param continueOnError:[可选参数]错误继续执行。默认False
888
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
889
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
890
+ :return:None
891
+ '''
892
+ @staticmethod
893
+ def GetParentElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
894
+ """
895
+ 获取父级元素
896
+
897
+ eh = WebPW.GetParentElement(eh, continueOnError=False, delayAfter=100, delayBefore=100)
898
+
899
+ :param eh:[必选参数]ElementHandle
900
+ :param continueOnError:[可选参数]错误继续执行。默认False
901
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
902
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
903
+ :return:ElementHandle
904
+ """
905
+ @staticmethod
906
+ def GetNextSiblingElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
907
+ """
908
+ 获取下一个兄弟元素
909
+
910
+ eh = WebPW.GetNextSiblingElement(eh, continueOnError=False, delayAfter=100, delayBefore=100)
911
+
912
+ :param eh:[必选参数]ElementHandle
913
+ :param continueOnError:[可选参数]错误继续执行。默认False
914
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
915
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
916
+ :return:ElementHandle
917
+ """
918
+ @staticmethod
919
+ def GetPreviousSiblingElement(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> ElementHandle | None:
920
+ """
921
+ 获取前一个兄弟元素
922
+
923
+ eh = WebPW.GetPreviousSiblingElement(eh, continueOnError=False, delayAfter=100, delayBefore=100)
924
+
925
+ :param eh:[必选参数]ElementHandle
926
+ :param continueOnError:[可选参数]错误继续执行。默认False
927
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
928
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
929
+ :return:ElementHandle
930
+ """
931
+ @staticmethod
932
+ def GetChildrenElements(eh: ElementHandle, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> list | None:
933
+ """
934
+ 获取子节点
935
+
936
+ ehList = WebPW.GetChildrenElements(eh, continueOnError=False, delayAfter=100, delayBefore=100)
937
+
938
+ :param eh:[必选参数]ElementHandle
939
+ :param continueOnError:[可选参数]错误继续执行。默认False
940
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
941
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
942
+ :return: list[ElementHandle, ElementHandle,...]
943
+ """
944
+ @staticmethod
945
+ 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
+ '''
947
+ 点击元素
948
+
949
+ eh = WebPW.Click(target, button="left", clickType="click", anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
950
+
951
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串 或 ElementHandle
952
+ :param button:[可选参数]鼠标按键。left:左键,right:右键,middle:中键。默认left
953
+ :param clickType:[可选参数]点击方式。click 单击,dblclick 双击。默认click
954
+ :param anchorsElement:[可选参数]锚点元素,默认None
955
+ :param continueOnError:[可选参数]错误继续执行。默认False
956
+ :param position:以元素左上角偏移量{\'x\': 0, \'y\': 0},None时点击中心
957
+ :param keyModifiers:[可选参数]辅助按键["Alt", "Ctrl", "Shift"]可多选。默认None
958
+ :param delayTime:超时(豪秒)。默认10000
959
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
960
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
961
+ :return: ElementHandle
962
+ '''
963
+ @staticmethod
964
+ 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
+ '''
966
+ 鼠标悬停在元素上
967
+
968
+ eh = WebPW.Hover(target, anchorsElement=None, continueOnError=False, position=None, keyModifiers=None, delayTime=10000, delayAfter=100, delayBefore=100)
969
+
970
+ :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串 或 ElementHandle
971
+ :param anchorsElement:[可选参数]锚点元素,默认None
972
+ :param continueOnError:[可选参数]错误继续执行。默认False
973
+ :param position:以元素左上角偏移量{\'x\': 0, \'y\': 0},None时点击中心
974
+ :param keyModifiers:[可选参数]辅助按键["Alt", "Ctrl", "Shift"]可多选。默认None
975
+ :param delayTime:超时(豪秒)。默认10000
976
+ :param delayAfter:[可选参数]执行后延时(毫秒)。默认100
977
+ :param delayBefore:[可选参数]执行前延时(毫秒)。默认100
978
+ :return: ElementHandle
979
+ '''
980
+ @staticmethod
981
+ 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
+ """
983
+ 输入文本
984
+
985
+ eh = WebPW.Input(text, target, anchorsElement=None, continueOnError=False, delayTime=10000, delayAfter=100, delayBefore=100)
986
+
823
987
  :param text:[必选参数]文本内容
824
988
  :param target:[必选参数]tdRPA拾取器获取的目标元素特征字符串 或 ElementHandle
825
989
  :param anchorsElement:[可选参数]锚点元素,默认None
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tdrpa.tdworker
3
- Version: 1.2.12.6
3
+ Version: 1.2.13.0
4
4
  Summary: tdworker for tdrpa developers. supports python3.8+, windows x64
5
5
  Home-page: https://gitee.com/tdworker/command/wikis
6
6
  Author: vx:RPA_CREATOR
@@ -23,6 +23,7 @@ Requires-Dist: pyzmq
23
23
  Requires-Dist: pillow
24
24
  Requires-Dist: netifaces
25
25
  Requires-Dist: requests
26
+ Requires-Dist: configobj
26
27
 
27
28
  tdworker for rpa developers. supports python3.8+, windows x64
28
29
 
@@ -1,4 +1,4 @@
1
- tdrpa/tdworker.cp311-win_amd64.pyd,sha256=XXGAMTyVWt6cXyhgzw28GY4dhTkoLzgYpFBBM68MRCA,4776448
1
+ tdrpa/tdworker.cp311-win_amd64.pyd,sha256=O032jxpOoZtYGD6GMIbCDh0c9HbFhe9G60frBaUZaAg,4924928
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
@@ -82,19 +82,20 @@ tdrpa/_tdxlwings/quickstart_fastapi/requirements.txt,sha256=y3pL1maFFVyROPGnd2YD
82
82
  tdrpa/_tdxlwings/rest/__init__.py,sha256=Dk7m0qKA9yIswBm_66Vw1MHmiiYRmqZ3egAUIMjUjts,41
83
83
  tdrpa/_tdxlwings/rest/api.py,sha256=yfv1VkTpjQOzxLh4aMnZQsh8wTRHg34KkyipKDa_w4g,12885
84
84
  tdrpa/_tdxlwings/rest/serializers.py,sha256=ztMzL_EgbhAb3rSbfWFE2A9uyOykoZbkSoDHPeKXzGg,2885
85
- tdrpa/tdworker/__init__.pyi,sha256=H5602jkV_k7msPClhkpuJxrLK7Hx2QubeoyqGI5LkYk,402
86
- tdrpa/tdworker/_clip.pyi,sha256=Y0FB0DHj8lLPC6uhfc8BOjpyfvhBZagrcm4hha7f_ss,1381
87
- tdrpa/tdworker/_excel.pyi,sha256=Kc684QBhV4p2lvj9y1K5Kmo2r0t492BzGN7Q5DRGVR4,61904
85
+ tdrpa/tdworker/__init__.pyi,sha256=Lid_yROmUJbiHtVrZrLnF-wYK9sMk2jPR6nSINiLzew,483
86
+ tdrpa/tdworker/_clip.pyi,sha256=BkWLBBqyoRMTP-Tm_BP4cN4O8vNo5mYBYOEdexW1-UA,1500
87
+ tdrpa/tdworker/_excel.pyi,sha256=v5FYe98czmJ4YAfRKpqLBlBX0N-CIMJnV6osq_XwDLU,65221
88
+ tdrpa/tdworker/_file.pyi,sha256=4WMemijmTqBgvnIBK0erEZL41C7UitnoPxyk3WVkfgU,3424
88
89
  tdrpa/tdworker/_img.pyi,sha256=f1FZQYHSItcjbtQ09LrXrD7IzUXWpOfe7Tu-J-9heuk,26375
89
- tdrpa/tdworker/_mail.pyi,sha256=2zTPzM2XIyjCjTSDYRraAaE1SegLsdabwUQmEpCbaIY,1998
90
+ tdrpa/tdworker/_network.pyi,sha256=NcEOc6bNuZjvZGUQTbMkODBVaiekXDAtZGyQHRNhXss,4690
90
91
  tdrpa/tdworker/_os.pyi,sha256=cK2UJk6pM8piWA2Mkx3j1v0i5vYlttaiGvm62yaPhzc,2274
91
92
  tdrpa/tdworker/_sp.pyi,sha256=OwKyMzbxhTvjXcHBx-w_6et1hdlJTPyHMpC8DHjWW4Q,635
92
93
  tdrpa/tdworker/_w.pyi,sha256=ZwyIk5cLv8Rd0KpshdZSJ9EIN0XYMHYCARw31pvrzys,5229
93
- tdrpa/tdworker/_web.pyi,sha256=JT0Emv9ge-0u2ITLvqWDg-zh5P8cGE1Zantdpbw_odk,67984
94
+ tdrpa/tdworker/_web.pyi,sha256=L3VsEArkmoiVxdizHpwF-thzQ9ep8xIMQhSbGkCLXz0,77598
94
95
  tdrpa/tdworker/_winE.pyi,sha256=s5IHyB4zLyshyvcPEEjaY-Vdyy02E1fnECASzXUsFZY,17557
95
96
  tdrpa/tdworker/_winK.pyi,sha256=lH1_smTsfHQVDaREOy37cb1Ied8zlKo6Q20oc1GXBGc,5407
96
97
  tdrpa/tdworker/_winM.pyi,sha256=E_PJm6cLgpkqy7fcD6CMNlSS31xVmE1N31DP1Cj47yI,7938
97
- tdrpa.tdworker-1.2.12.6.dist-info/METADATA,sha256=mxRKmndbzpU9WOwMBVwM4Q6Q1tet-FGzShv0nKH5Bsg,964
98
- tdrpa.tdworker-1.2.12.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
99
- tdrpa.tdworker-1.2.12.6.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
100
- tdrpa.tdworker-1.2.12.6.dist-info/RECORD,,
98
+ tdrpa.tdworker-1.2.13.0.dist-info/METADATA,sha256=_WYzahS-AKrfEv5sBvwLDcqZmggNoDWUT7aOptkRC_M,990
99
+ tdrpa.tdworker-1.2.13.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
100
+ tdrpa.tdworker-1.2.13.0.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
101
+ tdrpa.tdworker-1.2.13.0.dist-info/RECORD,,
tdrpa/tdworker/_mail.pyi DELETED
@@ -1,23 +0,0 @@
1
- class Mail:
2
- @staticmethod
3
- def SendMail(user: str = '', pwd: str = '', sender: str = '', title: str = '', content: str = '', to: str | list = '', cc: str | list = None, attr: str | list = None, server: str = 'smtp.qq.com', port: int = 465, ssl: bool = True, timeout: int = 10, continueOnError: bool = False):
4
- '''
5
- 发送邮件
6
-
7
- Mail.SendMail(user=\'\', pwd=\'\', sender=\'\', title=\'\', content=\'\', to=\'\', cc=None, attr=None, server="smtp.qq.com", port=465, ssl=True, timeout=10, continueOnError=False)
8
-
9
- :param user: [必选参数]邮箱登录帐号,比如普通QQ邮箱的登录帐号与邮箱地址相同
10
- :param pwd: [必选参数]登录密码
11
- :param sender: [必选参数]发件人邮箱地址
12
- :param title: [必选参数]邮件的标题
13
- :param content: [必选参数]邮件正文内容,支持HTML类型的正文内容
14
- :param to: [必选参数]收件人邮箱地址,多个地址可用["xxx@qq.com","xxx@163.com"]列表的形式填写, 也可以是单个邮箱地址字符串
15
- :param cc: [可选参数]抄送邮箱地址,多个地址可用["xxx@qq.com","xxx@163.com"]列表的形式填写, 也可以是单个邮箱地址字符串, None:不需要抄送,默认None
16
- :param attr: [可选参数]邮件附件,多个附件可以用["附件一路径","附件二路径"]列表的形式填写,也可以是单个附件路径字符串, None:不需要附件,默认None
17
- :param server: [可选参数]SMTP服务器地址,默认smtp.qq.com
18
- :param port: [可选参数]SMTP服务器端口,常见为 25、465、587,默认465
19
- :param ssl: [可选参数]是否使用SSL协议加密,True为使用,False为不使用,默认True
20
- :param timeout: [可选参数]超时时间(秒),默认10
21
- :param continueOnError: [可选参数]发生错误是否继续,True为继续,False为不继续。默认False
22
- :return:None
23
- '''