Is it possible to combine UI controls in MS Coded UI tests?

Edit. Since my question was too long and covered many different points, I decided to stop it with smaller and more specific questions.

I use Coded UI tests to run an automated test, however I realized that the UIMap generates the same element over and over when I create different tests on a page. Can these repeating elements be merged? See screenshot below:

enter image description here

Answer:

stoj gave a better answer by suggesting http://uimaptoolbox.codeplex.com/ . It's a great tool for cleaning up those nasty, repetitive elements.

+3


source to share


2 answers


There is no easy method for changing properties on a large number of registered controls at the same time. If the tests run fine without the innertext property, you can open the UIMap.uitest file in your favorite text editor and delete them relatively quickly. Not a perfect solution, but faster than doing the same in a test editor. Of course, you want to keep a backup of your uitest.

If the values ​​have to change, things get much more complicated, you can create a UIMap for each language and manually edit the XML file with the corresponding language.



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

+2


source


Q1: Using Coded UI Test Builder, you can navigate the hierarchy of the user interface. 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 toolkit is the best choice for combining duplicate controls. We are aware of this issue and are investigating to make a product fix.



Q3: We have made some fixes to handle dynamic identifiers in SharePoint controls. Can you try with Visual Studio 2010 SP1? If you are using SP1, please tell me the specific scenario that is not right for you. I can do even more.

+1


source







All Articles