开发者

“Object not visible” error is displayed during qtp automation

“Object not visible” errors displayed for some controls like “WinMenu” in the first time & it requires m开发者_运维技巧anual effort for 1st time to access these controls. then it runs correctly.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜