“对象不可见” qtp自动化期间显示错误

发布于 2024-09-04 06:26:53 字数 71 浏览 5 评论 0原文

某些控件(例如“WinMenu”)在第一次和以后显示“对象不可见”错误第一次需要手动操作才能访问这些控件。然后就可以正确运行了。

“Object not visible” errors displayed for some controls like “WinMenu” in the first time & it requires manual effort for 1st time to access these controls. then it runs correctly.

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

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

发布评论

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

评论(3

一页 2024-09-11 06:26:53

菜单项是否是由应用程序延迟创建的?如果您的 menu_name 参数深达几个级别,请尝试将其分隔为每个级别的一个步骤,以便创建子项目,例如,

Window("Calculator").WinMenu("Menu").Select "View"
Window("Calculator").WinMenu("Menu").Select "View;Scientific"

如果这有效,您可以 RegisterUserFunc 一个使用 RegisterUserFunc 的函数code>Split 自动执行此操作。

Could it be that the menu items are created lazily by the application? If your menu_name param is several levels deep try to separate it a step for each level so the sub-items are created e.g.

Window("Calculator").WinMenu("Menu").Select "View"
Window("Calculator").WinMenu("Menu").Select "View;Scientific"

If this works you can RegisterUserFunc a function that uses Split to do it automatically.

梦归所梦 2024-09-11 06:26:53

我也有这个问题。

我运行两个显示器,当我在左侧显示器上测试应用程序时,没有问题。
另一个论坛上的其他人说他们做了同样的事情并且解决了这个问题。

很奇怪。

I had this problem too.

I run two monitors, when I have the application that I am testing on the left hand monitor, I have no problem.
Someone else on another forum said they did they same thing and it fixed it.

Very strange.

じ违心 2024-09-11 06:26:53

我在一个简单的弹出对话框中遇到了类似的问题,QTP 在尝试执行

Browser(title).Dialog("Windows Internet Explorer").WinButton("OK").Click

此操作时不断给出错误“对象不可见”,这让我沮丧了几个小时,所以我想我会将其发布在这里,以防它对任何人有用。请注意,我正在使用的测试不是由我编写的,它们大量使用对象存储库(boourns)。

我必须转到“工具”>“对象识别

选择环境“标准窗口”
然后添加强制属性“visible”
对于对话框类和 WinButton 类

然后我删除并重新捕获 WindButton 对象,一切都很好。
不确定这是否有助于描述性编程人员解决这个问题。

I had a similar problem with a simple dialog pupop box, QTP kept giving error "object not visible" when trying to do

Browser(title).Dialog("Windows Internet Explorer").WinButton("OK").Click

It frustrated me for hours so I thought I'd post it here in case it's useful to anybody. Note that the tests I'm working with were not written by me and they use an object repository heavily (boourns).

I had to go to Tools > Object Identification

Choose Environment "standard windows"
then add mandatory property "visible"
for both the Dialog Class and the WinButton Class

Then I deleted and and re-captured the WindButton object and all was well.
Not sure if this helps the descriptive programming folks with this issue or not.

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