Ann, the syntax for retrieving text using getroproperty is: var =
object.getroproperty("text")
I have found that getvisibletext is unreliable, especially when the background
of the text has a graduated shading. Getvisibletext uses OCR to read the text
from the screen. Errors occur when the contrast between the text and the
background is not uniform. Getvisibletext should only be used to read text
that cannot be obtained any other way. However, understand that it may be
unreliable. I have an application where text is sometimes painted on the
screen and cannot be obtained through an object's text property. Getvisibltext
is the only way to get the text in this instance; however, I have to ensure
that the row is not highlighted since highlighting uses vertically graduated
shading.
On Dec 29, 2011, at 9:07 PM, ann hoang wrote:
> Hi Anish,
>
> Thank you very much for your info. If I use GetROProperty method so does it
> get text in real time? if yes Please give me examples how to use it. Many
> thanks
>
> Ann
>
>
> --- On Sat, 12/24/11, Anish Pillai <[email protected]> wrote:
>
> From: Anish Pillai <[email protected]>
> Subject: Re: Get visibleText
> To: [email protected]
> Date: Saturday, December 24, 2011, 3:51 AM
>
> Hi Ann,
>
> GetTextLocation method in QTP is dependent upon the OS versions, service
> packs etc. Because of this your scripts that were running in Win XP might not
> run in Win 7. Refer to the below point taken from QTP help.
>
> The results of this method may be different in different run sessions
> depending on the operating system version you are using, service packs you
> have installed, other installed toolkits, the APIs used in your application,
> and so on. Therefore, when possible, it is highly recommended to use the
> GetROProperty method to retrieve the value of the text (or equivalent)
> property from an object in your application instead of using the
> GetTextLocation method.
>
> Regards,
> Anish Pillai
>
> [Automation Repository]
>
> [Subscribe via Email] [RSS Feed]
>
> --
> AR
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en