i want to extract a text from textblock or image and compare against user input text

1 Answer 214 Views
WPF Testing
Satyavathi
Top achievements
Rank 1
Satyavathi asked on 02 Jun 2022, 07:49 AM

I am using WPF application. i want to extract a text from textblock or image and compare against user input text.

Can you please provide inputs how to do this?

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 03 Jun 2022, 03:01 PM

Hello Satyavathi,

Thank you for sharing details on the scenario you need to cover.

You can use the Test Studio feature to extract text into run-time variables - you can get the value from an element in the DOM tree or from an image

As a next step you can insert a verification in your test, which checks the user input and data drive the ExpectedString value with the extracted variable. You can check the screenshot for reference. 

I hope this information helps you adjust the required scenario. Let me know if you need further assistance on the case. 

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
WPF Testing
Asked by
Satyavathi
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or