Series on Coded UI Test Extensibility

I have posted a series of blogs on extensibility support in Coded UI Test.

  1. Introduction to Coded UI Test Extensibility
  2. “Hello, World” Extension for Coded UI Test
  3. Introducing Sample Excel Extension
  4. Technology Adapter of Sample Excel Extension
  5. Property Provider of Sample Excel Extension
  6. Action Filters of Sample Excel Extension

These should get anyone looking for writing extension for Coded UI Test, get started.  Use the Coded UI Test forum for questions\more info.

P.S. A related post: 7. Configure search properties used by recorder\code generation

More sidekicks:

8. Writing extension for WPF custom control

9. Extending supported properties set of a control

10. Writing your own client using UITest Object Model

More posts by Mathew Aniyan on this topic –

11. Custom WPF Control’s custom properties

12. Enabling UI Testing for Third party WinForms custom controls – 1

13. Enabling UI Testing for Third party WinForms custom controls – 2 

Comments (38)

  1. CarlCromer says:

    Hello Gautam, My name is Carl Cromer and I am currently using VS 2010 Ultimate. I am using the CUIT to test software. Basically clicking buttons, navigating the web app, etc. I have come across a nav tree that I cannot retrieve the objects (checkboxes) within with the crosshairs tool. It returns the container object and it has no children. I went through your series on the Code UI Test Extensibility and it didn't resolve my issue. Have you seen this issue before. Any help that you can provide will be greatly appreciated.

  2. Your control seems like a custom control that has not exposed the functionality properly.  Please post your questions with details about the control on the forum (at…/threads) to see if someone from community is able to help here.

  3. Ravi Syalee says:

    Hi Gautam, Can you provide an example of implementing extensibility for MSAA technology?

  4. @Ravi – Not sure what you mean by this. Please elaborate.

  5. Hello Gautam,

    I want to create Setup/Exe of the Coded Auto UI test Project script written for one web application to run it on multiple machines.

    Can we do it?

    if Yes How?

    Please Help.

  6. Sai says:

    Hi Gautam Goenka,

    Thanks for your posts, and they are very helpful.

    Currently in my project, we are using a third party dll called iGrid, hxxp:// (please replace hxxp with http). The problem with this dll in Auto UI testing is that, for example, UI testing can only identify the whole

    DataGrid, but not an individual cell.  Although after reading your posts, I still don't know how to start to work to extend my project to support this dll. The excel example is using .NET remoting which confuses me. Do you have an easy eample or can you give me some advice how should I work to achieve extensibility? Thank you very much.

  7. @Sai – If the Grid does not support accessibility, which seems to be the case, you need to get the information via some other means.  In case of Excel, I used Excel Addin that sits in the Excel process and communicates with Coded UI Test (in another process) via .NET Remoting.  You will have do something similar.  This may not be easy but I don't have any better solution.

  8. RSri says:

    Hi ,

    I am trying to UIA instead of MSAA for all controls. I downloaded the UIAProxy sample and followed the instructions above,but then the application is still recording/recognizing controls using MSAA . referred UitestLog.html( %temp%UItestLogs).however the UitestLog.html shows the overriden GetService() in UIAProxyPackage.cs. At run time, Playback.GetCoreTechnologyManager() from the recorded steps of the application also shows as MSAA.  Should I need to override the methods in technologyManager.cs  ? please help.


  9. Nitro52 says:

    Hi Gautam,

    Looking at this sample it looks very much like this has been architectured to only deal with one control type, The cell. Are you able to give me a quick overview of what classes you would need to have for each control type you want to support? it looks like there should be a PropertyProvider, Information class, an element class (the base element seems to have cell specific info) and a PropertyNames class. is this right?

  10. Please send me a mail using the blog and I will try to hook you with someone who can help you furhter.

  11. sravan says:

    Hi Gautham,

    i am using the coded ui Testing for my application i have wriiten script for my application and even my script is working fine but at one particular place i am facing problem and the error i checked in the log file is "Browser is trying to block the control" and my script is getting stopped can u please help me what might be the problem

  12. sadhana says:

    Hi Gautam,

    I am currently planning to use Descriptive programming for my Silverlight Application.

    Could you direct me to any blog where  there is a step by step guide on creating coded ui test using descriptive programming.

    Or are there any sample code where i can download them.



  13. @sadhana – I am not aware of any

  14. @sravan – Please post your issue on forums –…/threads and someone from community will help you.

  15. Venkat says:

    Hi Gautam

    can we write plugins for the coded ui to run on chrome?

  16. @venkat – Yes, but it will be some work, say few man months at least.

  17. Hi Gautam

    I want to develop tests for aspx pages containing Telerik controls. Telerik do not offer CUIT wrappers for their controls but it strikes me that I should be able to get the information I want from the client:is that possibe? e.g. I have a Telerik date input control that has a red border when an invalid date is entered. Is there a way I can create an extension to allow me to test when the border is red? . I don't have, or want to have detailed knowledge of the internal mechanics of the Telerik control but I do know that when there is an error a particular HTML element has a red border. Is there an easy way to create a provider that uses client attributes like this? Or some other way of doing this. I think there must be a lot of people who would ike to use this type of thing.

  18. @Dave – Sorry for late reply.  I did not get any notification for this comment.  For web controls, I believe this should work without need for any provider.  You can get the control and its IHtmlElement (via casting the NativeElement property) – with that you should be able to validate this.

  19. Cost of Coded UI frameWork says:

    Hello Gautam,

    We are in Plan to migarate all our Existing QTP scripts to VSTS Coded UI. As I seen MS have Already "Coded UI frameWork" In place.

    Can you please suggest/Guide me Like how much addtional cost we need to Pay for same we are license For VS2010 ulimate version already.



  20. @Naveen – The Coded UI Test is included in VS Premium and VS Ultimate.  So if you have that already, you don't need to pay anything more!!!

    P.S.  This is the most "happy" answer I have ever given!

  21. Cost of Coded UI frameWork says:

    Thats Great. Thanks for confirmation.

    P.S. Nice to see this "Happy" Answer :).

  22. Boris says:

    Hi Gautam,

    My name is Boris and I'm using VS2010 Ultimate. I'm trying to run UI Test WPF window that has canvas within, whose width is changed and additional objects (such as "Path" objects) are added once I press a particular button. Also, within this WPF window, I have an image object which I can rotate, chnage to black&white or to coloured, set another image from a particular folder etc. When I open this WPF window in Snoop, I can see all those changes, but when I'm running UItest – the test cannot detect canvas/path objects and can not provide the information of the image within the page, such as: whether it is balck&white or coloured, what is the image source etc.

    Can you please help me to resolve this issue. Any code example will be highly appreciated.

    Thank you in advance,

  23. Hi Boris,

    The Coded UI Test is targeted towards line of business enterprise applications.  It has somewhat poor support for free-form paintingimaging operations and you are running into those.

    If you want to use Coded UI Test, you have to use the extensibility provided there to make it understand your app better.  Refer –…/writing-extension-for-wpf-custom-control.aspx…/custom-wpf-control-s-custom-properties.aspx


  24. Durga says:

    Hi Gautam,

    Our application is developed using Dev Express. I have seen in Mathew's blog, that with extensions and accessibility we can automate Devexpress controls using coded UI. But my question is, if there is no code change possible from Developer side on Dev Express, can I automate the test using only coded ui extensions.Controls appear as MSAA client object presently.

    Please let me know if that is possible

  25. Aharon says:

    Hi there

    i have a similar case to the one been posted here

    "Enabling UI Testing for Third party WinForms custom controls – 1"

    but my case is at WPF.

    what is the best practice for the issue?

    would item status help me here?

  26. @Durga – No, the code change is not possible from the developer side to improve the support.  The author of the control (in this case DevExpress) has to do that.  We are working with various vendors on this and will share the plan when we have something confirmed.

    @Aharon – For WPF, you should refer…/aa350483.aspx and…/WPF_Application_Quality_Guide_CTP4_Final.doc

  27. Naren says:

    Coded UI support application devloped using Java Script and ActiveX controls?

  28. @naren – It supports Java Script but not ActiveX.

  29. Ed says:

    i am trying to record coded ui for WPF application. my goal ls to click on button (Mybutton).

    Problem – in the application there is another control which in not visible (transparet) and it lays on top of my button. Each time i'm clicking myButton – the code which the CUIT generates is for the blockingControl

    i have the app code – but have no permissions to change the xaml (i can add my own implementation such "onCrerationAutomationPeer" )

    Is there a way to write a plug in which will know to recognize that the BlockingCcontrol is not visible – and will not choose it?

  30. RajanRajesh says:

    Hi Gautham

    I am looking for a CodedUI extension for Microsoft outlook . Could you be able provide a sample project for the same.

  31. @Rajan – Sorry, I am not aware of any sample project for Outlook.  Above series is your best bet to create the sample.

  32. @Ed – If you can post the issue on forum (…/threads) along with the XAML snippet, I am sure someone will be able to help you.  There are lot of parameters that can be tweaked here – so the person need to try it out for the exact case.

  33. Rajesh Rajan says:

    Hi Gautam,

    I saw your sample excel extension project   , but I need to create same for Microsoft outlook which will allow me to capture the mail item , which is not working with coded UI..

    If I need to create a coded UI outlook extension , how should I need to proceed to achieve this and how to begin with.

    Thanks in Advance.

  34. @Rajesh – I am not aware of anyone having created Outlook plugin for Coded UI Test. There is Excel sample and Rangers have also published Word sample.  Between these two, you should get fair deal to try an Outlook plugin.

  35. Learner says:

    Hi Gautam,

    I want to write a program that is similar to CodedUITestBuilder. It will use the raw actions that generated by "recorder service" to build some custom actions.

    The question is: Are there any APIs to support my program to start the "recorder service" then listen to its raw actions?



  36. @learner – Sorry, the recorder APIs are not publicly exposed.