Can we use fakes to test AutomationElement methods RRS feed

  • Question

  • Hi Everyone,

    We are evaluating Microsoft "Fakes" frame work to write logical to test AutomationElement methods. My method is 

    =============  Actual Method =======

      public static string GetControlType(AutomationElement.AutomationElementInformation aeControl)
              return aeControl.LocalizedControlType;


    ================= Test Method ================ 

            public void GetControlTypeTest()
                    ShimAutomationElement.ShimAutomationElementInformation fakesControl;                

    I don't find any 'LocalizedControlType' on fake control.

    Can anyone help me here to write logical UTs for above method?  I am using VS 2012



    • Edited by Rajendar M Monday, June 23, 2014 6:07 AM
    Friday, June 20, 2014 7:10 AM


  • Hi Rajendar,

    Glad to see you again:)

    I also didn't find the official information which said that it supported the AutomationElement method.

    As my understanding, the real issue is that which kind of app you are testing and what function your method in your project has, we also need to know the real functions and requirements of Fakes:


    Maybe you could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio.
    The Visual Studio product team is listening to user voice there. If you submit it, please share me the link, I will help you vote it.


    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.

    Monday, June 23, 2014 9:53 AM