其他设备上的 SAP GUI “无法通过 ID 找到控件。”

问题描述 投票:0回答:1

我正在使用 anaconda python 3 和 SAP GUI 770。 我正在尝试创建 SAP GUI 自动化程序并在其他设备上创建应用程序。

当程序到达导出电子表格方法时,它会停止工作并出现此错误:

pywintypes.com_error: (-2147352567, '发生异常。', (619, 'SAP 前端服务器', '无法通过 id 找到控件。', 'C:\Program Files (x86)\SAP\FrontEnd\ SAPgui\sapfront.HLP', 393215, 0), 无)

保存文件时,我有材料文档列表对话框窗口,而其他设备有窗口对话框窗口

material Document List dialog

代码:

session.findById("wnd[1]/usr/ctxtDY_PATH").text = folderdir
session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = filename
session.findById("wnd[1]/usr/ctxtDY_FILENAME").caretPosition = 3
session.findById("wnd[1]/tbar[0]/btn[0]").press()
python scripting sap-gui
1个回答
0
投票

您必须选中“显示本机 Microsoft Windows 对话框”复选框。单击工具栏上的右键,然后选择选项...\辅助功能和脚本\脚本。取消选中选项窗口中的最后一个复选框。

© www.soinside.com 2019 - 2024. All rights reserved.