locked
Coded UI Test PropertyGrid RRS feed

  • Question

  • Hi there,

    I am developing Map Drawing (GIS) application. I am using winform components Docking frame work from WeifenLuo some customs treeviews and mainly for user inputs default PropertyGrid with dozen UITypeEditors and TypeConverters. I am not care about user inputs cause I labeling my object with attributes and all work is doing by PropertyGrid like in VisualStudio. 

    Now I am trying UICoded test that is in VisualStudio 2012. I am surprised that I am able record user action on my custom treeview and it works. But cause I am using PropertyGrid I have big problem with recording some action under Preperty Grid. 

    For Example I have UIType Editors for setting some property. This UIeditor is modal window. And I have not able record or simulate click on Browse Button. Playback always ends with error like this

    Test Name: CodedUITestMethod1
    Test Outcome: Failed
    Result Message:
    Test method CodedUITestProject8.CodedUITest1.CodedUITestMethod1 threw exception: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: 
    TechnologyName:  'MSAA'
    ControlType:  'Button'
    Name:  'Browse...'

    With dropdown Editors the error is similar. Sometimes I am not able write text into propertygrid. 

    I know that winforms is old technology but I am not able migrate to WPF.

    Ok is there some way how to test property grid with UITypeEditors. Can I tell to playback where browse button is to continue playback?  

    I can setup some test project and show exactly what is my problem. 

    Or can I override default PropertyGrid to make it compatible with UICoded Test?

    Thanks vary much for your help. 


    Friday, November 28, 2014 9:36 AM

All replies

  • Hi IvanMjartan,

    I doubt that your controls don’t have enough support on Coded UI record and playback. Please see the four levels for coded UI support described in this blog: http://blogs.msdn.com/b/visualstudioalm/archive/2011/10/28/coded-ui-test-extension-for-3rd-party-controls-the-basics-explained.aspx

    After that, you can reference the following documents to write coded UI test for your controls:

    Series on Coded UI Test Extensibility

    Enable Coded UI Testing of Your Controls

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Monday, December 8, 2014 4:56 AM
    Monday, December 1, 2014 6:43 AM
  • Ok thanks for your reply ... I try check your links ... Hope it will help.  
    Wednesday, December 3, 2014 2:03 PM
  • Hi there, I checked your links and I thing that it useful information for me to test my own controls. 

    But my most important component is PropertyGrid and I am not able to make mean record and play tests. 

    So can I see some example how to test propertygrid I mean standard System.Windows.Forms.PropertyGrid component. Is it possible  make valid test on propertygrid, modal and dropdown uieditors and expandables. My test always ends with error that is not possible find Browse … button that launch for example modal dialog. Can I fix somehow test manually to say test engine that Browse button is … 

    I am not able understand that System.Windows.Forms.PropertyGrid is not fully supported for CodedUITest. OK may be I can … winforms is too old technology. 

    Thanks very much 
    Monday, December 8, 2014 6:30 PM
  • I just had the same issue. Through the UITest recorder i would get Control not found while attempting to click the [Browse...] button.

    But i re-recorded my macro with click on the row in the propertygrid. then press F4.

    OR

    Mouse.Click(uIRow, new Point(63, 6));
    // Type '{F4}' in '?' row
    Keyboard.SendKeys(uIRow, "{F4}", ModifierKeys.None);

    Tuesday, April 7, 2015 3:14 PM