Page 1 of 1

Getting the text inside a button's icon

Posted: Wed May 02, 2018 4:00 pm
by Machisperer
I have a button that displays a number which is dynamically set by the application under test. I need the number to do some validations with it. However, I tried pretty much all the properties of the button to try and get number but so far couldn't. Please see a snapshot of the button in the attachment. Any idea/tips/hint would be much appreciated.

Re: Getting the text inside a button's icon

Posted: Thu May 03, 2018 11:38 am
by qwertzu
Hi,
You could try to add the classname to the GDI capture list and see if Ranorex is able to identify a text element from which you can retrieve data.
GDI_Capture_List.png
However, it's quite hard to tell how the text is implemented on the button since there are no screenshots visible in the snapshot.
regards, qwertzu

Re: Getting the text inside a button's icon

Posted: Fri May 04, 2018 8:17 am
by odklizec
Hi,

If the text you want to extract from button is a part of image, then I'm afraid, you are out of luck here. The only help could be some kind kind of OCR code, which may eventually help with extracting text from image. But I'm afraid, there is no built-in feature like this in Ranorex.

Re: Getting the text inside a button's icon

Posted: Thu May 10, 2018 11:13 pm
by Machisperer
Thanks guys for the replies. I will play with the GDI capture and see.