Reputation: 31
I have a question regarding coded ui UIMap. Every time I record an action on the same application, coded ui generates a new object for the same window in the application. It looks like: UIAdminWindow
UIAdminWindow1
UIAdminWindow2
and so on... every window class holds different buttons, even though it's the same window. Thus it's very hard to keep code maintenance. What i would like is that every time i perform actions and records on a window, even if not at the same time, the already generated class for this window, will be updated with the new controls. any suggestions to why it happens?
Thanks a lot!
Upvotes: 2
Views: 1223
Reputation: 39
In UIMap.uitest
you can change the action name and the control name for better maintenance.
For example: you can set UIAdminWindow
as FirstAcessWindow
or other name that will express comfortably the control or the action.
Upvotes: 1
Reputation: 324
What I can guess is that there is some randomly generated content or element identification data such as class or title that may be causing it. This may be caused by different username for example. Also you can update the element from UI map element tree.
Upvotes: 0
Reputation: 12546
You can clean up your UIMaps by doing two things:
And yes, it's a pain to do, but it's worth it for maintainability.
Upvotes: 1