how to get text from wpfbutton (272 Views)
Posts: 2
Registered: ‎09-20-2013
Message 1 of 3 (272 Views)

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.
HP Expert
Posts: 245
Registered: ‎08-06-2013
Message 2 of 3 (225 Views)

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
Posts: 125
Registered: ‎11-29-2011
Message 3 of 3 (199 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.