| |
Methods defined here:
- CloseExcelFile(self, sourceFilePath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 源文件完整路径
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- CommonAction(self, json='', time_pre=0, time_pro=0, timeout=10, exc=0)
- # 通用Agent通信方法(momo)
- Copy(self, sourceFilePath='', sheetName='', readRange='', time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:文件地址
:param sheetName:sheet名称
:param readRange:范围
:param time_pre:
:param time_pro:
:param timeout:超时时间
:param exc:
:return:
- GetMessage(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- OpenExcelFile(self, sourceFilePath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:完整文件物理路径
- Paste(self, sourceFilePath='', sheetName='', rangeStr='', xlPasteType='', xlPasteSpecialOperation='', skipBlanks='', transpose='', time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:文件地址
:param sheetName:sheet名称
:param rangeStr:范围内容
:param xlPasteType:类型
:param xlPasteSpecialOperation:选项
:param skipBlanks:
:param transpose:
:param time_pre:
:param time_pro:
:param timeout:超时时间
:param exc:
:return:
- SaveAsExcelFile(self, sourceFilePath, filePath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param filePath:目标路径
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- SaveExcelFile(self, sourceFilePath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- __init__(self)
- Initialize self. See help(type(self)) for accurate signature.
- append_win_text(self, ctrlList, value, time_pre=0, time_pro=0, timeout=10, exc=0, click_pre=1, mousedriver='')
- @param ctrlList: 元素信息
@param value: 值
@param mousedriver:鼠标驱动方式:系统消息,COM
@return:
- attach_excel(self, matchType, matchText, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param matchType:获取类型(0:文件名;1:当前活动)
:param matchText:匹配字符串(仅文件名匹配时有效)
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- check_pic(self, pic_path, accuracy=0.96, timeout=1000, exc=0)
- :param pic_path: 图片地址
:param accuracy: 精度
:param timeout: 超时时间
:param exc: 异常处理
:return:
- clear_excel(self, sourceFilePath, sheetName, clearRange, clearType, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param clearRange:清除范围(如A1:B2)
:param clearType:清除方式
:param time_pre:运行前延时
:param time_pro:运行后延时
:param timeout:超时时间
:param exc:异常
:return:
- click_img(self, pic_path, buttontype, clicktype, accuracy, time_pre=0, time_pro=0, excursion_x=0, excursion_y=0, timeout=0, exc=0)
- @param ctrlList: json字符串,包含元素信息
@param buttontype: 按键类型:左键,右键,无
@param clicktype: 点击类型:单击,双击,无
@param accuracy: 精度,int类型
@param excursion_x: x坐标偏移量,int类型
@param excursion_y: y坐标偏移量,int类型
@param timeout: int,超时时间
@param exc: int,异常处理
@return:dict,{x: float, y: float, width: float, height: float}
- command_click(self, tabUrl, docUrl, xpath)
- # 浏览器点击
- coord_screenshot(self, ctrlList, savepath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList: 坐标
:param savepath: 截图保存路径
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- copy_sheet(self, sourceFilePath, sourceSheetName, filePath, sheetName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源excel文件完整路径
:param sourceSheetName:源工作表名
:param filePath:目标excel文件完整路径
:param sheetName:目标工作表名
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- create_workbook(self, filePath, fileName, extensionName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param filePath:文件路径(不包含文件名称)
:param fileName:文件名称(不包含扩展名)
:param extensionName:文件扩展名
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- create_worksheet(self, filePath, sheetName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param filePath:文件路径
:param sheetName:工作表名
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- cv_click(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 CV模式单击
- cv_double_click(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 CV模式双击
- cv_focus(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 CV模式获取焦点
- delete_sheet(self, sourceFilePath, sheetName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 源文件完整路径
:param sheetName:工作表名称
:param time_pre:运行前延时
:param time_pro:运行后延时
:param timeout:超时时间
:param exc:异常处理
:return:
- drag(self, ctrlList_start, type, ctrlList_end, x_end, y_end, mouseposition, offsetx, offsety, drag_speed, time_pre=0, time_pro=0, timeout=10, exc=0, mousedriver='')
- :param ctrlList_start: 被拖拽的元素
:param type: 拖拽方式
:param ctrlList_end:目标元素
:param x_end: 目标位置的x坐标
:param y_end: 目标位置的y坐标
:param drag_speed: 拖拽速度,0-快,1-慢,2-拟人
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:param mousedriver:鼠标驱动方式:系统消息,COM
:return:
- editor_type_keys(self, ctrlList, value, time_pre=0, time_pro=0, timeout=10, exc=0, click_pre=1, mousedriver='')
- :param ctrlList: 元素信息
:param value: 设置值
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:param click_pre: 输入前点击
:param mousedriver:鼠标驱动方式:系统消息,COM
:return:
- element_screenshot(self, ctrlList, savepath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList: 元素信息
:param savepath: 截图保存路径
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- export_pdf(self, sourceFilePath, sheetName, pdfPath, pdfFileName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param pdfPath:导出PDF路径
:param pdfFileName:导出PDF文件名称
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- filter_data(self, sourceFilePath, sheetName, selectRange, screenIndex, screenCondition, screenContent, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param selectRange:查找范围
:param screenIndex:筛选索引
:param screenCondition:筛选条件
:param screenContent:筛选内容
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- forward(self, subject, to, cc, bcc, body, attachments, isHtmlBody, isDraft, draftFolder='', mailID='', time_pre=0, time_pro=0, timeout=10, exc=0)
- :param subject:主题
:param to:to
:param cc:cc
:param bcc:bcc
:param body:邮件内容
:param attachments:附件
:param isHtmlBody:是否为HTML格式
:param isDraft:是否保存为草稿
:param draftFolder:草稿箱名称
:param mailID:原始邮件ID
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- get_cell_background(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_col(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_col_first_row(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_email(self, account, folder, count, filter, isGetUnreadOnly, isSetMailReaded, isGetAttachment, savePath, time_pre=0, time_pro=0, timeout=10, exc=0, exFilter='', includeEmbedAttachments=False, fromFilter='', toFilter='', ccFilter='', titleFilter='', contentFilter='', attachmentFilter='', sortByDateDesc=True)
- :param account:账号名称
:param folder:文件夹名称
:param count:获取数量
:param filter:筛选条件
:param isGetUnreadOnly:是否只获取未读邮件
:param isSetMailReaded:是否设置为已读
:param isGetAttachment:是否获取附件
:param savePath:附件保存目录
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:param exFilter:日期过滤条件
:param includeEmbedAttachments:附件是否包含内嵌资源
:param fromFilter:发件人过滤条件
:param toFilter:收信人过滤条件
:param ccFilter:抄送人过滤条件
:param titleFilter:标题过滤条件
:param contentFilter:内容过滤条件
:param attachmentFilter:附件过滤条件
:param sortByDateDesc:是否按照日期倒叙排序结果列表(默认应为:是)
:return:
- get_first_col(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_first_row(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_formtable(self, ctrlList, timeout=10)
- :param ctrlList: 表格元素信息
:param timeout: 超时时间
:return:
- get_row(self, sourceFilePath, sheetName, getType, cellPosition, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param getType: 获取方式
:param cellPosition: 单元格位置
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- get_sheet_name(self, sourceFilePath, readType, numberOrContent, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param readType: 读取方式
:param numberOrContent:序号或内容
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- get_table(self, ctrlList, pagenum, nextbutton='', time_pre=0, time_pro=0, timeout=10, loadtime=0, exc=0)
- :param ctrlList: 表格元素信息
:param pagenum: 获取页数
:param nextbutton: 下一页按钮
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param loadtime: 点击下一页后等待时间
:param exc: 异常处理
:return:二维数组
- get_win_attr(self, ctrlList, attr, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList:元素信息
:param attr:属性
:param time_pre:运行前延时
:param time_pro:运行后延时
:param timeout:超时时间
:param exc:异常处理
:return:
- get_win_text(self, ctrlList, time_pre=0, time_pro=0, timeout=10, exc=0)
- @param ctrlList: 元素信息
@return:
- hide_clo_row(self, sourceFilePath, sheetName, operationType, startCell, endCell, time_pre=0, time_pro=0, timeout=10, exc=0)
- - sourceFilePath 源文件完整路径
- sheetName 工作表名称
- operationType 操作类型
- startCell 起始单元格
- endCell 结束单元格
- timeout 超时时间
- ie_click(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 IE模式单击
- ie_close(self, timeout=10, exc=0)
- # IE浏览器回显 关闭IE浏览器
- ie_double_click(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 IE模式双击
- ie_focus(self, config_path, selector_path, timeout=10, exc=0)
- # IE浏览器回显 ie模式获取焦点
- ie_get_text(self, selector_path, timeout=10, exc=0)
- # IE浏览器回显 IE获取文本
- ie_open(self, url, timeout=10, exc=0)
- # IE浏览器回显 打开IE浏览器
- insert_delete(self, sourceFilePath, sheetName, operationType, startCell, num, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 源文件完整路径
:param sheetName:工作表名称
:param operationType:操作类型
:param startCell:起始单元格
:param num:数量
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- is_exist(self, ctrlList, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList: 元素信息
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- key_press(self, value, time_pre=0, time_pro=0, timeout=10, exc=0, delayms=0, keyboarddriver='')
- @param value:str,键码
@param delayms:int,间隔
@param keyboarddriver:驱动方式:系统消息,COM
@return:
- key_types(self, value, inteval, time_pre=0, time_pro=0, timeout=10, exc=0, keyboarddriver='')
- @param key:
@param keyboarddriver:驱动方式:系统消息,COM
@return:
- matchImg(self, imgsrc, imgobj, excursion_x, excursion_y, confidencevalue)
- @param imgsrc: 原始图像
@param imgobj: 待查找的图片
@param confidencevalue: 精度,int类型
@return:
- ocr_ali(self, type, appcode, img_file)
- @param type: 识别的类型:目前只有名片,后续可以补充
@param appcode: 阿里创建应用的appcode
@param img_file: 要识别的图片
@return:json字符串
- ocr_baidu(self, type, client_id, secret_key, pic_name, id_card_side='front')
- 参考:https://ai.baidu.com/ai-doc/OCR/nk3h7xy2t
@param type: 识别类型:名片、定额发票、普通图片_高精度版,身份证识别,身份证混贴识别,增值税发票识别等,后续可以扩充
@param client_id: 百度创建的应用的id
@param secret_key: 百度创建应用的key
@param pic_name: 要识别的图片
@param id_card_side: 要识别的身份证正反面:front:身份证含照片的一面,back:身份证带国徽的一面“
@return:json字符串
- read_cell(self, sourceFilePath, sheetName, readRange, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param readRange: 获取范围
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- read_cell_value(self, sourceFilePath='', sheetName='', readCell='', time_pre=0, time_pro=0, timeout=10, exc=0, getTypeValue='')
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param readCell: 获取范围
:param getTypeValue: 获取类型
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- read_range_value(self, sourceFilePath='', sheetName='', readRange='', time_pre=0, time_pro=0, timeout=10, exc=0, getTypeValue='')
- :param sourceFilePath: 文件地址
:param sheetName: sheet名称
:param readRange: 获取范围
:param getTypeValue: 获取类型
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return: 获取的数据
- refresh_excel(self, sourceFilePath, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath: 文件地址
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- rename_sheet(self, sourceFilePath, oldSheetName, newSheetName, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param oldSheetName:旧工作表名称
:param newSheetName:新工作表名称
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- reply(self, subject, to, cc, bcc, body, attachments, isHtmlBody, isDraft, draftFolder='', sendType='', mailID='', time_pre=0, time_pro=0, timeout=10, exc=0)
- :param subject:主题
:param to:to
:param cc:cc
:param bcc:bcc
:param body:邮件内容
:param attachments:附件
:param isHtmlBody:是否为HTML格式
:param isDraft:是否保存为草稿
:param draftFolder:草稿箱名称
:param sendType:发送类型
:param mailID:原始邮件ID
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- run_excel_macro(self, sourceFilePath, commandName, parameterGroup, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param commandName:待执行宏的名称
:param parameterGroup:参数列表,子项用逗号隔开
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- sap_checkbox_selected(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 选中状态,int类型,-1选中,0取消选中
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_click(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_columnscount(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_doubleClickNode(self, id, key, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_expandNode(self, id, key, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_getcelltext(self, id, row, column, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param row: 单元格的行数,int类型
:param column: 单元格的列数,int类型
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_gettext(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_input_tcode(self, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param val: 输入的值
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_input_text(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 输入的值
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_login(self, loginname, id_user, id_pwd, username, passworld, time_pre=0, time_pro=0, timeout=10, exc=0, mandt='', langu='', logon_opt='')
- :param loginname: 登录名称
:param id_user: 用户名输入框
:param id_pwd: 密码输入框
:param username: 用户名
:param passworld: 密码
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:param mandt: 集团(可不填,不填写就是默认值)
:param langu: 语言(可不填,不填写就是默认值)
:param logon_opt: 是否踢掉别人(非必填,1-继续登录并结束系统中的任何登录,2-继续登录,不结束系统中任何其他登录,3-终止此次登录)
:return:
- sap_presskey(self, id, key, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_rowcount(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_scrollbar(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 行数,int类型
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_select(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_selectcolumns(self, id, val, flg, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 行数,int类型
:param flg: 选中状态,-1:选中,0:取消选中
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_selectioninterval(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 日期
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_selectrow(self, id, val, flg, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 行数,int类型
:param flg: 选中状态,-1:选中,0:取消选中
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_sendkey(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 编码
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_sendvkey(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 编码,int类型
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_setfocus(self, id, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- sap_toolbarbutton(self, id, val, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param id: id
:param val: 按钮值
:param time_pre:运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- scroll(self, direction, time_pre=0, time_pro=0, timeout=10, exc=0, mousedriver='')
- @param direction: 鼠标滚动方向和次数,int类型,正数为向上滚动,负数为向下滚动
@param mousedriver:鼠标驱动方式:系统消息,COM
@return:
- search_value(self, sourceFilePath, sheetName, selectContent, selectRange, searchType, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param selectContent:查找内容
:param selectRange:查找范围
:param time_pre:
:param time_pro:
:param timeout:
:param exc:异常处理
:return:
- send_email(self, subject, to, cc, bcc, body, attachments, isHtmlBody, isDraft, time_pre=0, time_pro=0, timeout=10, exc=0, draftFolder='', senderEmail='')
- :param subject:主题
:param to:to
:param cc:cc
:param bcc:bcc
:param body:邮件内容
:param attachments:附件
:param isHtmlBody:是否为HTML格式
:param isDraft:是否保存为草稿
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:param draftFolder:草稿箱名称
:param senderEmail:发信人地址
:return:
- sendmsg(self, strs, name)
- #发消息
- set_checkbox(self, ctrlList, value, type, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList: 元素信息
:param value: 是否勾选
:param type: 仍要操作或忽略
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- set_column_height(self, sourceFilePath, sheetName, setupRange, height, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param setupRange:设置范围
:param height:高度
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- set_column_width(self, sourceFilePath, sheetName, setupRange, width, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param setupRange:设置范围
:param width:宽度
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- set_format(self, sourceFilePath, sheetName, cellPosition, cellFormat, backColor, fontColor, fontSize, fontStyle, horizontal, vertical, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param cellPosition:单元格位置
:param cellFormat:单元格格式
:param backColor:背景颜色
:param fontColor:字体颜色
:param fontSize:字体大小
:param horizontal:字体
:param vertical:水平对齐
:param time_pre:垂直对齐
:param time_pro:
:param timeout:
:param exc:
:return:
- set_mail_read_status(self, isUnRead, mailID='', time_pre=0, time_pro=0, timeout=10, exc=0)
- :param isUnRead:主题
:param mailID:原始邮件ID
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- set_select(self, ctrlList, value, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param ctrlList: 元素信息
:param value: 设置的值
:param time_pre: 运行前延时
:param time_pro: 运行后延时
:param timeout: 超时时间
:param exc: 异常处理
:return:
- set_wrapped(self, sourceFilePath, sheetName, celsetupRange, isAutoChangeLine, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param celsetupRange:设置范围
:param isAutoChangeLine: 是否自动换行 "true" "false"
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- super_mouse(self, ctrlList, coords, buttontype, clicktype, movetype, time_pre=0, time_pro=0, timeout=10, exc=0, excursion_x=0, excursion_y=0, mousedriver='')
- @param ctrlList:元素信息
@param coords: 坐标,如(900,400)
@param buttontype:按键类型:左键,右键,无
@param clicktype:点击类型:单击,双击,无
@param movetype:移动类型:拟人,正常
@param mousedriver:鼠标驱动方式:系统消息,COM
@return:
- user_input(self, msg, timeout=10, exc=0)
- :param msg: json类型消息
:param timeout:
:param exc:
:return:
- write_cell(self, sourceFilePath, sheetName, cellPosition, writeValue, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param cellPosition:单元格位置
:param writeValue:写入的值
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- write_cell_value(self, sourceFilePath, sheetName, cellPosition, writeValue, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param cellPosition:单元格位置
:param writeValue:写入的值
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
- write_range_value(self, sourceFilePath, sheetName, cellPosition, writeValue, time_pre=0, time_pro=0, timeout=10, exc=0)
- :param sourceFilePath:源文件完整路径
:param sheetName:工作表名称
:param cellPosition:单元格位置
:param writeValue:写入的值
:param time_pre:
:param time_pro:
:param timeout:
:param exc:
:return:
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|