How to get the text from a control type : client using coded UI

1k views Asked by At

I have a Windows Application, which has a control type: Client and class name =WindowsForms10.WIndows.8.app.0.3ce0bb8_r11_ad1

It is like a sub title bar. It has a text which displays the number of records in the table below. I want to extract that number of records. How ever when I spy using UIMap-CodedUI Test Builder, it highlight the entire title bar and does not only highlight the number of records. Is there any way I can handle this.enter image description here I want to extract 495 from the title bar. How can I do that?

2

There are 2 answers

1
nisha kanani On BEST ANSWER

Thank you all for your reply.

I could figure out an answer.

1) 495 is not shown as a UI control.

2) I found a work around , I can calculate the rows in the table below using UISyncDataGridTable.Rows.Count

and it serves my purpose.

3
Joel Fazio On

You could use AutoHotkey. This or this function should be able to complete the task you want. The installer also comes with windows spy, which might help you pinpoint the control class you want to extract the string from.