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

how to get text from wpfbutton

Team,
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.
Avinash
Please use plain text.
HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 2 of 3 (112 Views)

Re: how to get text from wpfbutton

Hello,

 

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: http://support.openview.hp.com/selfsolve/document/KM177318

 

Hope they help!

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
Please use plain text.
Regular Advisor
HaiTNguyen
Posts: 105
Registered: ‎11-29-2011
Message 3 of 3 (86 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.
Please use plain 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