Micro Focus QTP (UFT) Forums
GetROProperty and GetVisibleText in QTP - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: GetROProperty and GetVisibleText in QTP (/Thread-GetROProperty-and-GetVisibleText-in-QTP)



GetROProperty and GetVisibleText in QTP - sreejith - 02-03-2012

Hi All,

I'm facing a problem in QTP using GetROProperty for extracting text from Button and Static field in Windows Application.

Problem Faced:
String which is expected to be displayed in Button and static field is not displayed properly(it is having string cut) in UI. But on using GetROProperty it returns the expected text eventhough string cut is present in UI.
Other alternative is GetVisibleText.But when GetVisibleText is used also some portion of the text which is not displayed in UI is returned.Also QTP help file itself mentions not to use GetVisibleText as it return value may differ across platforms.

Can anyone help in sorting this out?Any other alternative?

Thanks in Advance.


RE: GetROProperty and GetVisibleText in QTP - rajpes - 02-06-2012

As long as that getroproperty remains unique in the application there shouldn't be any reason not to use it.If u want exact same text to appear on the window, ask developer to change it


RE: GetROProperty and GetVisibleText in QTP - sreejith - 02-06-2012

Hi Raj,

Thanks for the reply.

Our objective is to check for the localization of application UI in different languages.But if GetRoProperty is used it fails to recognize the string cut in UI, if present.

The logic used is to extract the string from the UI and compare with the expected string to check whether the localization is successful.The result will be always pass if GetROProperty is used,since it returns the text associated with the control rather than the text displayed.

When GetVisibleText is used the output is not consistent for different run sessions as well as across operating systems.

Kindly suggest any alternative for this?


RE: GetROProperty and GetVisibleText in QTP - rajpes - 02-07-2012

Attach some screenshots with object spy on both button,static field and related data with which u compare and any additional information