Micro Focus QTP (UFT) Forums
How to use GetROProperty - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to use GetROProperty (/Thread-How-to-use-GetROProperty--4778)



How to use GetROProperty - mv8167 - 04-30-2011

I am trying to learn how to use GetROProperty instead of using chelkpoints (as it has been mentioned to me)

In a website: using v9.5

How do I check to see if a link, image or text (etc) exists before continuing on in the script? (a code example is all I need)

How do I verify that all of my images, links, text (etc) in my object repository are found on the page and none are missing.

Thx guys


RE: How to use GetROProperty - Jay - 05-02-2011

you can use .Exist method to check any object is present or not.

Code:
if Broswer().Page().Link().exist then

End if

you can use any property inside getroproperty to see the run time value:
suppose you are checking amount 500 in your application for button object then:
Code:
iexpectedamount= 500
iactualamount = Browser().page().Webbutton().getroproperty('innertext")
you this variables to check the value.


RE: How to use GetROProperty - mv8167 - 05-02-2011

Jay,

If I want my automated test to wait until a certain property is visible/etc, would I:
Code:
If False = Broswer().Page().Link().exist then
   wait(1)
End if
thx,
Lorena


RE: How to use GetROProperty - UFTEnthusiast - 05-02-2011

Hi Lorena,

Use Do loop until condition

Eg:

Code:
Do

Loop Until  Browser().Page().WebButton().Getropropterty("visible")=True

thanks,


RE: How to use GetROProperty - mv8167 - 05-02-2011

Thank! Rajendra


RE: How to use GetROProperty - mv8167 - 05-02-2011

I tried your suggestion but received the following Run Error:

Object doesn't support this property or method: 'Browser(...).Page(...).WebElement(...).Getropropterty'

Line (22): "Loop Until Browser("WisdomLogin").Page("WisdomLogin").WebElement("Welcome to Wisdom").Getropropterty("visible")=True"

What am I doing wrong?

thx


RE: How to use GetROProperty - Jay - 05-03-2011

GetRoProperty ..use this
Spelling was incorrect earlier.


RE: How to use GetROProperty - UFTEnthusiast - 05-03-2011

Hi Lorena,

Use Do loop until condition

Eg:

Do

Loop Until Browser().Page().WebButton().GetRoProperty("visible")=True


thanks,


RE: How to use GetROProperty - mv8167 - 05-04-2011

Yes, I got it to work.

thxxxxx all