Thank you very much David for very clear info.  I will try to install the 
patches and see how it works.  Again very appreciate David.  Happy NewYear!
 
Ann

--- On Fri, 12/30/11, David Whitehouse <[email protected]> wrote:


From: David Whitehouse <[email protected]>
Subject: Re: Get visibleText
To: [email protected]
Date: Friday, December 30, 2011, 6:48 PM




Ann, according 
to http://support.openview.hp.com/selfsolve/document/FID/DOCUMENTUM_QTP_00644, Windows
 7 and Windows Server 2008 R2 do not support Windows API text recognition as XP 
did.  Under QTP, getvisibletext only works in the optical character recognition 
(OCR) mode and its reliability is unreliable at best.  Once you install QTP 
patches 00626 and 00644, text recognition under Tools > Options >  Text 
Recognition will only allow the "Use only OCR" option to be selected.  These 
patches do not limit text recognition but they accurately reflect your choices 
in QTP's tools.  If these are not installed, you may want to do that and select 
the OCR only option.  However, Getvisibletext should be your tool of last 
resort and it may not work as you need.  Your best options are to use the 
object's test or native properties to retrieve the text content.  Again, if the 
content is painted on the screen and is not reflected in the object's accessible
 property then the OCR option is your only choice unless you can extend QTP to 
make the information accessible.











On Dec 30, 2011, at 9:17 AM, ann hoang wrote:






Thank you very much for your info.
I did try get visible text and it works well in winxp but when I change os to 
win 7 and all of my get visible text is not working any more so now I try to 
find other way to work it out.  Please advise!  Many thanks
 
Ann

--- On Thu, 12/29/11, David Whitehouse <[email protected]> wrote:


From: David Whitehouse <[email protected]>
Subject: Re: Get visibleText
To: [email protected]
Date: Thursday, December 29, 2011, 10:54 PM



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

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

Reply via email to