我正在录制使用 c# 开发的基于 Windows 的应用程序。现在,我想使用 QTP 对此应用程序执行自动化测试。但是,问题是在使用 object spy 捕获少量对象时,我的测试执行时出现以下错误:
Cannot identify the object "[ WinObject ]" (of class WinObject). Verify that this object's
properties match an object currently displayed in your application.
Line (4): "Window("object class:=WindowsForms10.Window.8.app.0.329445b_r11_ad1","window
id:=1705523").Window("object class:=WindowsForms10.Window.8.app.0.329445b_r11_ad1","window
id:=2").WinObject("object class:=WindowsForms10.Window.8.app.0.329445b_r11_ad1","window
id:=1115822","x:=195","y:=140").DblClick 256,103".
Please check attached snapshot for screen and object properties using object spy.
以下是屏幕截图:
我在录制时遇到的问题是对象间谍无法捕获特定区域(即在这种情况下,屏幕面板上显示的数据)。