tags:

views:

205

answers:

2

“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.

+1  A: 

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.

Motti
hmmm, actually in Window(window_name).WinMenu("Menu").Select menu_name - menu_name is several levels deep (Eg:Edit;Parts) but accessing Edit is the issue as "object not found error" comes, then if we select the menu item manually then it works..
Onnesh
A: 

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.

DeviousBlue
in Winmenu, i couldnt find the visible property also i couldnt understand what this property change will do to prevent this error - all other controls working fine
Onnesh