qtp 自动货测试桌面程序-笔记(使用函数)
新建-function

写入函数
rem 关闭出现错误窗口
Function checkExist()
If Window("出现错误").WinObject("确定").Exist(3) Then
Window("出现错误").WinObject("确定").Click
End If
End Function
保存文件
引用:添加函数文件到resources

在脚本中使用Call 方法 使用函数:Call checkExist()
新建-function

写入函数
rem 关闭出现错误窗口
Function checkExist()
If Window("出现错误").WinObject("确定").Exist(3) Then
Window("出现错误").WinObject("确定").Click
End If
End Function
保存文件
引用:添加函数文件到resources

在脚本中使用Call 方法 使用函数:Call checkExist()