Very Odd. I record pressing the Print button (a VBbutton), then play it back and get an "Object not visible" error. Yet, I can take the Object Spy and point it at the Print button and sees it's properties.
Use ChildObjects to see how many of these objects exist on the page. Chances are there are more instances, but some are hidden from the user.
Anshoo Arora Relevant Codes
try using wait before you click on the button.
I don't make the software, Rather I make it better.
My Blogs: All About Automation Spell Checker
I used the ChildObjects method to find the button and even verify that the object was visible, but when I try to click on it, I still get an "Object not visible error".
Are you using more than one monitor?
Somtimes that can throw QTP off.
Not at the table, Carlos!
How many objects does the childobjects collection hold?
Try setting focus on its container first? Dialog box or whatever it is.
This will not work if there is a duplicate instance of the object which even though exists, but is hidden from the user.
Doug - Loop through the childobjects collection and retrieve "x" for each item in the collection. Example:
<font class="small">Code:</font><hr /><pre>
Set obj = Description.Create
obj("micclass").Value = "Image"
Set oCol = Browser("").Page("").ChildObjects(obj)
For i = 0 to oCol.Count - 1
If there is only 1 visible item on the page with the description you provided, then it will be the one which has 'x not equal to 0'. If this fails to work, then we might have to try something else..
Please set one correct value for "index" when finding this object if you are using DP.
The objec which you could view and click is only one of objects with same properties. So I suggest you add "index" to get the desired object.