João Louros
João Louros

Reputation: 2760

Is it possible to merge UI Controls on MS Coded UI Tests?

Edit: Since my question was too long, and touched a lot of different points, I decided to brake it down into smaller and more specific questions.

I am using Coded UI tests to run automated, however I realized UIMap generates the exact same element over and over again when I create different tests on the some page. Is it possible to merge this repeated elements? Please see screenshot below:

enter image description here

Answer:

stoj provided the best answer by suggesting http://uimaptoolbox.codeplex.com/ .It's a great tool to clean up those nasty repeated elements.

Upvotes: 3

Views: 1420

Answers (2)

Mathew Aniyan
Mathew Aniyan

Reputation: 11

Q1: Using Coded UI Test Builder, you can navigate in the UI hierarchy. http://blogs.msdn.com/b/mathew_aniyan/archive/2010/01/13/coded-ui-test-tip-of-the-day-2-use-the-navigation-dial-to-move-around-in-the-ui-tree.aspx

Q2: UIMap toolbox is your best bet for merging the duplicate controls. We are aware of this issue and investigating to make a product fix.

Q3: We had made some fixes to handle the dynamic ids in SharePoint controls. Can you try with Visual Studio 2010 SP1? If you are using SP1, please let me know a specific scenario which fails for you. I can invetsigate further.

Upvotes: 1

stoj
stoj

Reputation: 679

There isn't an easy method for modifying properties on a large number of recorded controls at the same time. If the tests will run fine without the innertext property you could open the the UIMap.uitest file in your favorite text editor and delete them relatively quickly. Not an ideal solution but faster than doing the same thing in the test editor. You do of course want to keep a backup of the uitest file.

If the values have to change things get alot more complicated you could create a UIMap for each language and manually edit the xml file with the appropriate language.

I don't think there is any way to get rid of duplicated controls.There is a UIMap toolbox but I'm not sure it will actually remove duplicate controls. http://uimaptoolbox.codeplex.com/

Upvotes: 2

Related Questions