UFT 15.01 读取桌面应用程序的网格表花费的时间太长

问题描述

我使用的是 UFT 15.01 自动化桌面应用程序(后端 C++ 和前端 .NET)

我正在尝试使用以下代码从应用程序读取网格表 -

Set objGrid = SwfWindow("application").SwfWindow("screen").SwfObject("mobjGrid")

Set objGrid_Native = objGrid.Object.Sheets.Item(0)
strColumnCount = objGrid_Native.ColumnCount()
intGridRowCount = objGrid_Native.RowCount()

For intRowCounter = 0 To intGridRowCount - 1 Step 1
                    For intCount = 0 To strColumnCount - 1 Step 1
                        objGrid_Native.SetActiveCell intRowCounter,intCount
                        strValue = objGrid_Native.ActiveCell.Value()
                    Next
            Next

代码运行良好。

问题: 网格有 139 行和 25 列,上面的代码读取表格需要 20 多分钟,我需要对 10 种不同的产品进行迭代,这使得执行时间约为 3 小时。

有没有更好的方法来最小化执行时间,请提出建议。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)