0

I have problems with text controls recording. My tested application: desktop, WinForms, .NET 4.6

When I use "Coded UI Test Builder" then for new text controls it automatically creates following search properties:
ControlType: Text
TechnologyName: MSAA
Name: John

"Name" property value is the same as for "Display Text" one. If text is changed (e.g. John -> Jane) this control will not be found. I need independent search properties. Instead of "Name" property I would like to use "ControlName".

My search properties:
ControlType: Text
TechnologyName: MSAA
ControlName: lFirstName

Of course, I can change search properties manually after recording completion in UIMAP.uitest

Disadvantages of this solution:
1. Slow coding 2. Need advanced level tester 3. If you later use the "Coded UI Test Builder" again then it does not recognize such modified controls in UIMAP and creates "clones" for these ones.

a) Is it possible to configure Coded UI Test rules for recording to force it to use ControlName instead of Name?
b) Any other idea?

LiK
  • 1
  • 2
  • The "Name" property should already be the identifier for your control and shouldn't depend/change on user input. How did you set the name "John" for your control and how did you change it to "Jane"? – Progman Jul 12 '17 at 17:15
  • This is not ControlType Edit. Edit has fixed name. But this is ControlType Text. And John, Jane and so on are values from database. – LiK Jul 12 '17 at 19:09

1 Answers1

0

As far as I know if the "Name" property of the control has a value then Coded UI will record "Name" as the Search Property so it may not be possible to use "ControlName" apart from changing the UIMAP.uitest file manually for Windows-based applications. For web applications, you can configure the Search Properties by changing the IEPropertyConfiguration.xml file which is located at "C:\Program Files (x86)\Common Files\microsoft shared\VSTT\14.0" for 64 bit machines and "C:\Program Files\Common Files\microsoft shared\VSTT\14.0" for 32 bit machines.