Micro Focus QTP (UFT) Forums
QTP 11 - GetVisibleText not getting text correctly in windows7 from Activex - 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: QTP 11 - GetVisibleText not getting text correctly in windows7 from Activex (/Thread-QTP-11-GetVisibleText-not-getting-text-correctly-in-windows7-from-Activex)



QTP 11 - GetVisibleText not getting text correctly in windows7 from Activex - Pallavi - 03-12-2014

Hi,

We used getvisibletext to get the actual text displayed in Activex object in application. We could not use GetROProperty as we do not have any other property that has the required text.
Script gets the required text when run on Windows XP correctly.
But, when executed on Windows 7, it returns part of text in lower case and also it returns some junk value.
I know GetVisibleText is dependent on OS.
But still, if there is any workaround or any other way to get the text from application, please let me know.

Application displays the below text
"800849 NOLE,MANDI DOB 01/01/1995 (19Y) sex F ABO/Rh A POS RC Units Transf 10 LastTransf 12/15/1994 HID HID1"
But GetVisibleText on windows 7 is getting the below text
"800849 NOLE,MANDI dob 01/01/1995 (19Y) sex f ABO/Rh A POS RC Units Transf 10 ^##`@ LastTransf 12/15/1994 HID HID1"

In Windows 7 UAC is disabled.

If there is any workaround, please let me know.

Thanks and Regards,
Pallavi


RE: QTP 11 - GetVisibleText not getting text correctly in windows7 from Activex - venkatesh9032 - 03-14-2014

Hello pallavi...



IFyou want the particular linksto display use the property name of the link and use get -ro- property...as it is a run time object...if it is a test object please use get-to-property..(gettestobject)..


and coming to getvisible text...
Use the following stmt..

Brower(.*).Page(.*).getvisibletext

it will display the total text present in that page...


for windows 7 try to execute in ie8 browser.(recommended)
if you are using uft u can execute on ie9 brower(recommended)..

TQ