我正在尝试使用UFT和战斗示例应用程序来记录一个场景。我使用本教程https://www.youtube.com/watch?v=fWmfmqzW35w安装了WPF附加组件。
它安装成功了。但是在录音之后,我得到了一个没有wpf对象的代码。
Window("HPE MyFlight Sample Applicatio").Click 203,223
Window("HPE MyFlight Sample Applicatio").Type "john"
Window("HPE MyFlight Sample Applicatio").Click 216,280
Window("HPE MyFlight Sample Applicatio").Type "hp"
Window("HPE MyFlight Sample Applicatio").Click 186,348
Window("HPE MyFlight Sample Applicatio_2").Close执行代码后,我将得到以下错误:
Cannot identify the object "HPE MyFlight Sample Applicatio" (of class Window).
Verify that this object's properties match an object currently displayed in your application.
Description
Cannot identify the object "HPE MyFlight Sample Applicatio" (of class Window).
Verify that this object's properties match an object currently displayed in your application.
Object's physical description:
regexpwndtitle = HPE MyFlight Sample Application
regexpwndclass = HwndWrapper[FlightsGUI.exe;;a3bd17a0-f90c-492a-8183-ec384ab007cb]
is owned window = 0
is child window = 0 谢谢你的帮助。
发布于 2017-07-31 14:10:15
有三件事你需要检查。
一旦你做了上述工作,试着再记录一次。代码应该如下所示:
WpfWindow("HP MyFlight Sample Application").WpfEdit("agentName").Set "john"
WpfWindow("HP MyFlight Sample Application").WpfEdit("password").SetSecure "597f38ad85b47efe95f1"
WpfWindow("HP MyFlight Sample Application").WpfButton("OK").Clickhttps://stackoverflow.com/questions/45134281
复制相似问题