how to get text from wpfbutton
i am automating a wpf application using QTP11
I need help to get the text from wpfbutton, it is being used as tile and it has multi lines.
I tried getting text through,
Object.getvisibletext but it returns only single line.

Any help would be appreciated.

Thank you.
HPE Expert
Re: how to get text from wpfbutton



I would suggest you try with GetROProperty or  the Object property to retrieve the value of the text (or equivalent property) from an object in your application.

For more information about the Object property, please check here:


Hope they help!




“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
Valued Contributor
Re: how to get text from wpfbutton
What is the setting in Tools>Options>General>Text Recognition? Is it Multiple text block mode? What is your OS version?

And how does the text is set on the WpfButton? if it is using XAML to set text then...I'm afraid there is no way you can get the text.