Python如何自动化C ++应用程序?

时间:2015-01-15 09:16:05

标签: python qt scripting automation

我实现了自动化,目前正在使用QT(C ++)自动化应用程序。 我使用Squish使用Python脚本语言来完成此操作。

有人可以解释我究竟如何为Python变量分配C ++对象吗?

1 个答案:

答案 0 :(得分:1)

您是否需要在Python代码中引用C ++内置类型(int,long,char,wchar_t等)和数组?如果是这样,您需要使用ctypes Python包。这是an example of calling C++ dll function from Python。如果您需要发送Window消息(如WM_CLICK),请查看ctypes.Structure类。有some examples of C structures declared in Python code

编辑:目前我知道有关QT GUI自动化的2个开源项目。

此外,还可以使用Windows UIALinux AT-SPI的辅助功能构建和运行QT应用。