Answered by:
Dynamic Objects & Repository Questions

Question
-
Coded UI Test:
1. Does Coded UI Test handle the recording of Dynamic Objects of the application?
a. If yes, how?
2. Does Coded UI Test allow to generate the Object Repository if any application object has been changed without recording?
Dynamic Objects: the objects which are created programmatically/at run-time inside the application, dynamic objects may be or not the part of UI.
Friday, January 7, 2011 3:50 AM
Answers
-
There is no built-in feature/tool available to cater this need. Instead for the given exe you can use UI accessibility tools to figure out the change and do it in UIMap either using graphical editor [Coded UI Test Editor] or in UIMap.cs file.
Accessibility tools that you can use can be as per technology e.g., UISpy for WPF/Silverlight applications, IE developer tool for HTML pages, AccExplorer for winforms applications.
- Proposed as answer by Deepak.Singhal [MSFT]Microsoft employee Friday, March 11, 2011 9:39 AM
- Marked as answer by Mathew Aniyan MSFTModerator Friday, May 20, 2011 2:03 AM
Friday, March 11, 2011 9:39 AM
All replies
-
Yes, recording of the dynamic objects is supported. As long as your controls have good accessibility and search properties your recordings will work fine
what do you mean by object repository?
Refer to the following to to understand about the code generated by the codeduitest
If you think that your objects change , you can define the generic search properties of the control which are constant.
---Mark this post if this Answers or Helps---
Cheers
FunnyFoxSunday, January 9, 2011 1:06 PM -
Object Repository is a repository of the test application objects, if any UI element name changes then how do I know the track the new name of the object without recording it, is there any way to update the UIMAP.xml file, because I won't have the source i'll either get exe or dll from the developers, i won't have the new control name, that's why there should be some way to update the xml file.Monday, January 10, 2011 11:57 AM
-
2. you can create/manage UI Map (Object Repository) in codes without recording. It means you will not use UIMap.xml file. See how to hand-code CUIT in the Index.
For Dynamic Objects, you can create a generic object, an instance of UITestControl, then pass Search Properties to it in run-time for use.
Tuesday, January 11, 2011 7:23 AM -
hi quang,
Can you please show us how to manage the UI map(object Repository)?
Thanks,
Anne
Thanks, Anne ShashiThursday, March 10, 2011 7:59 AM -
you can have a look here @ http://blogs.msdn.com/b/mathew_aniyan/archive/2009/02/12/hand-coding-a-coded-ui-test.aspx for hand coding.
You can also take a look here which talks about having your own client . http://blogs.msdn.com/b/gautamg/archive/2010/04/27/writing-your-own-client-using-uitest-object-model.aspx
Thursday, March 10, 2011 10:00 AM -
There is no built-in feature/tool available to cater this need. Instead for the given exe you can use UI accessibility tools to figure out the change and do it in UIMap either using graphical editor [Coded UI Test Editor] or in UIMap.cs file.
Accessibility tools that you can use can be as per technology e.g., UISpy for WPF/Silverlight applications, IE developer tool for HTML pages, AccExplorer for winforms applications.
- Proposed as answer by Deepak.Singhal [MSFT]Microsoft employee Friday, March 11, 2011 9:39 AM
- Marked as answer by Mathew Aniyan MSFTModerator Friday, May 20, 2011 2:03 AM
Friday, March 11, 2011 9:39 AM