Micro Focus QTP (UFT) Forums
How to check the object is hidden - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to check the object is hidden (/Thread-How-to-check-the-object-is-hidden)



How to check the object is hidden - anbarasu - 12-01-2009

Hi,

How can we check the specific object is visible or not. I tried by standard check point (Disabled property) it does not work. It throws an error "Object not found" when the object is hidden.


RE: How to check the object is hidden - upadhyay40 - 12-02-2009

Hi Anbarasu,

You just use GetROProperty for getting the value i.e disable = 0 or 1 and then use your condition statement.

Thanks
Mahesh


RE: How to check the object is hidden - Jyobtech - 12-02-2009

This is one more method to find specific object is visible or not,
1. Select the specific object by using Object spy(Viewing Object Properties and Methods Using the Object
Spy)
2. To view the properties or methods of the run-time object, click the Run-time Object Properties radio button.
3. Check the specific object property is enable or disable


RE: How to check the object is hidden - venkatbatchu - 12-02-2009

Hi,
for this question
How can we check the specific object is visible or not

i have a one date field in application if it finds that field in application then it will display as "Pass" if it not identifies then it will display as "Fail"
Code:
If  Browser("xxxxxxxxx").Page("xxxxxxx").Frame("main").WebEdit("p_date").Exist Then
    msgbox "Pass"
else
    msgbox "Fail"
End If

And if u still have any doubts please let me know what is the difference between hidden and visible w.r.t your view so that we can solve ur issue...

Reards,
Venkat.Batchu


RE: How to check the object is hidden - v_selvam - 12-02-2009

GetROProperty for 'Visible' property. it will return 'True' for visible and False for hidden controls.

V.Selvam