python - Squish、Python、Windows 应用程序自动化

标签 python squish

我已经开始使用 Squish 来自动化使用 Python 的 Windows 应用程序。一些脚本只与 waitForObject 一起工作,还有一些脚本与 waitForObjectItem 一起工作。什么时候应该使用 waitForObject 什么时候应该使用 waitForObjectItem

最佳答案

我经常访问这个:http://doc.froglogic.com/squish/latest/

这真的很有帮助,尤其是当我忘记了什么的时候。这只是有帮助。

在这里,只需从上面的站点复制/粘贴:

waitForObject(objectOrName): Waits until the objectOrName object is accessible (i.e., it exists and is visible and enabled). It returns a reference to the object if successful or raises a (catchable) LookupError exception on failure

waitForObjectItem(objectOrName, itemIdentifier): Waits until the objectOrName object is accessible (i.e., it exists and is visible and enabled), and contains an item that is identified by the itemIdentifier and that is itself accessible. This function is typically used to access items inside containers such as lists, tables, and trees.

现在,换句话说,我明白了

waitForObject:它只是在等待一个现在存在并且可见的对象,这意味着如果你有一个 window1,在 window2 之上,最后一个,window2 因为 window1 而不可见,你不会使用这个功能;

waitForObjectItem:考虑到第一个功能,对象存在并且可见且启用,并且此Item 可以是表格的单元格;或树上的 child 等。

关于python - Squish、Python、Windows 应用程序自动化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36440649/

相关文章:

python - 如何在python中显示RGB图像

python - 使用 poplib python 获取邮件标题(主题)

linux - 在 ubuntu 上构建用于交叉编译 ARM 的挤压时出错

python - 如何通过数据框的值重新索引数据框?

Python 错误 : local variable referenced before assignment

python - 加速 sklearn 逻辑回归

python - 如何从 Squish 测试脚本中获取 Qt 对象的方法签名?

python - 如何通过 python 脚本发现应用程序使用的内存?

python - 通过python脚本在虚拟机cmd中发送DOS命令