locked
Coded UI in VS2010 Ultimate, Not all the Properties are Capturing RRS feed

  • Question

  • I'm recording an application thru coded ui, Vs 2010 Ultimate.

    Only some of the properties, general properties like name, friendly name and id are capturing.

    we are not getting
    Native Element property, which will choose to convert or cast to Automation Element class from UITestControl Class

    Control is capturing as UITestControl object, we need to convert this to AutomationElement object.

    Please provide your valuable suggestion. Thanks

    Thursday, April 4, 2013 12:43 PM

Answers

All replies

  • Hi,

    As my understanding, the coded UI test would not capture all properties for all controls. Sometimes we would write the extension for them.

    Reference:

    http://blogs.msdn.com/b/mathew_aniyan/archive/2011/05/17/enabling-ui-testing-for-third-party-winforms-custom-controls-2.aspx

    Of course, if it is the default controls (which is full supported in coded UI test), 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.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, April 5, 2013 10:03 AM
  • Hi Jack,

    Thanks for your reply. I cant fully understand the blog link, is it saying that to get the property value do we need to write some 40 LOC....

    And in the user voice link, they are asking for new ideas, and it seems that is not the link for my problem.

    Any way i will try the solution whatever u gave, but please give me a solution if you find better anything.

    Monday, April 8, 2013 9:53 AM
  • And Also in my project i'm getting error in this line

    AutomationElement autoEle=uitestcontrol.NativeElement as AutomationElement;

    But in this forum, they have given the same line,

    Monday, April 8, 2013 10:04 AM
  • Hi Sundar57,

    Sorry for my delay.

    It would be better if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well. In addition, you could share us the detailed error message in your new thread, and it will be helpful for us to resolve this issue.

    http://blogs.msdn.com/b/gautamg/archive/2009/11/29/how-to-enable-tracing-for-ui-test-components.aspx

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, April 10, 2013 5:38 AM
  • Only some of the properties, general properties like name, friendly name and id are capturing.

    we are not getting
    Native Element property, which will choose to convert or cast to Automation Element class from UITestControl Class

    Those properties might be in Filtering Properties instead of Searching Properties. PS: Sometimes it useful to move properties from Filtering to Searching.
    Thursday, April 11, 2013 12:25 PM
  • Hi Bogdan

    Can you please explain on this.

    we are using search properties only

    Wind.SearchProperties[

                    Wind.WindowTitles.Add(windowTitle);

    WinWindow.PropertyNames.Name] = windowTitle;
    Friday, April 12, 2013 7:08 AM
  • Hi Sundar57,

    Actually you would get more useful information from this blog:

    How does “Coded UI test” finds a control ??

    It share us the information about how the coded UI test find a control.

    In addition, if your coded UI test met some errors, I suggest you get the detailed error message as my previous reply, share it to us in a new thread. Would you mind posting this new issue in a new thread?

    Have a nice weekend,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, April 12, 2013 8:15 AM