无法识别QTP中的对象

发布于 2025-01-03 07:58:13 字数 285 浏览 5 评论 0原文

我正在使用 QTP 9.2。运行脚本时我反复收到此错误

无法识别对象“Login1$Password”(WebEdit 类)。 验证该对象的属性是否与当前对象匹配 显示在您的应用程序中。

当我第一次运行脚本时,它运行得很好,但现在发生了这个错误。我已经尝试了所有可能的解决方案通过对象存储库和对象间谍检查对象属性并启用智能识别结果显示:

对象不唯一(找到 3 个对象)或未找到对象..

I'm using QTP 9.2. While running script i got this error repeatedly

Cannot identify the object "Login1$Password" (of class WebEdit).
Verify that this object's properties match an object currently
displayed in your application.

When i run the script for first time it runs perfectly but now this error occurred. I have tried all the possible solution check object properties through object repository and object spy and enable smart identification result shows:

object not unique (3 objects found) or object not found..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

丑疤怪 2025-01-10 07:58:13

打开对象存储库并查看描述测试对象的属性。
现在,使用对象间谍查看应用程序中显示的 WebEdit 上相同属性的值。您应该发现不匹配,现在您必须确定新值是否是您期望看到的(在这种情况下,您可以使用从应用程序更新按钮),或者两个值是否都可以接受(在这种情况下)在这种情况下,您应该将属性值更改为正则表达式以涵盖所有可接受的情况)。

Open the object repository and look at the properties that describe the test object.
Now use the object spy to see the values of the same properties on the WebEdit that is displayed in your application. You should find a mismatch, now you have to decide if the new values are what you expect to see (in which case you can use the update from application button) or if both values are acceptable (in which case you should change the values of the properties to regular expression to cover all acceptable cases).

月下客 2025-01-10 07:58:13

似乎该对象在应用程序或对象存储库中发生了一些更改。因此,您最好使用“从应用程序更新”选项来更新对象存储库中该对象的对象描述。

谢谢,
GD

It seems that some changes has happen for that object either in Application or Object repository. So you better update the object description for that object in the object repository using the option "Update from Application".

Thanks,
GD

水染的天色ゝ 2025-01-10 07:58:13

我没有 QTP 9.2,所以我不太确定这是否有效,但是你不能为该对象添加一个视觉标识符吗?

如果对象位置永远不会改变,并且靠近它的另一个映射对象也永远不会改变位置,则可以使用第二个对象作为与尝试映射的对象的关系。

在 UFT 12 中,此选项称为视觉关系标识符设置,位于“对象属性”中的“描述属性”列表下方。由此,您可以从存储库中选择一个映射对象,也可以从屏幕上添加一个新对象。之后,您可以确定对象之间的关系(上/下、左/右、内联或外联)。

如果我和其他人提供的选项都不起作用,并且您有权访问开发团队,我建议要求他们提供该对象的 ID。

另外,作为一个好的做法,我会禁用智能识别功能,因为它有时会弄乱对象识别

I don't have QTP 9.2 so I'm not quite sure if this is valid, but can't you add a visual identifier for the object?

If the object position never changes and there is another mapped object close to it that also never changes position, you could use this second object as a relation to the one your are trying to map.

In UFT 12 this option is called Visual relation identifier settings and is located in Object Properties, below Description Properties list. From that, you can either select a mapped object from your repository, or add a new one, from the screen. After that you can determine the relation between the objects (above/below, left/right, inline or not).

If none of the options provided by me and others work and if you have access to development team, I'd suggest requesting them to provide an ID for the object.

Also, as a good practice, I'd disable the Smart Identification feature, as it can sometimes mess up the object identification

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文