locked
Coded UI - Test Builder not identifying all control properties RRS feed

  • Question

  • My test builder is not identifying all properties of a control as set/declared in form properties. It is either empty for few controls or improper. How to change the accessibility to these, so that my test builder can identify the properties exactly as set in form properties.
    Friday, March 16, 2018 9:15 AM

All replies

  • Hi Narayan, 

    Thanks for your posting. 

    Is it a WinForm application? I created a simple WinForm application with TabControl, and I cold access it with no problem. 

    I changed the Design name via right clicking the control property:

    And I could access it by using Coded UI testing:

    So please make use you've set the design name properly like mine shown above. 

     

    Regards, 

    Fletcher 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, March 19, 2018 6:05 AM
  • The controlname displayed in the above figure is of parent controlName(MainTab collection name) I assume.

    Main TabPage - tab1(ControlName). [Name or displayText = "xyz"]

    TabPage1 -tabpage1(controlName). [Name or displayText = "abc"]

    Correct me if I'm wrong. Let me know if its possible to get "tabpage1" as controlName ?

    Monday, March 19, 2018 6:49 AM
  • Hi Narayan, 

    Sorry for the late reply.

    I don't think "tabpage1" could be treated as ControlName, as it's been shown in DisplayText

    And the Name in Design section is treated as ControlName, so if you really need the "tabpage1" is the same name as ControlName, you could just change Design Name to "tabpage1". 

      

    Regards, 

    Fletcher 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Wednesday, March 28, 2018 9:32 AM
    • Proposed as answer by Fletch Zhou Thursday, March 29, 2018 6:52 AM
    Wednesday, March 28, 2018 9:32 AM
  • Please find the screenshot below. I change as you described Name in design section, but the controlname is displayed of parent control only.

    Friday, March 30, 2018 4:26 AM
  • It seems different as the result in my side. Which version of VS are you using please?

    I'm using VS2017 15.6.4, if it's ok, please us the sample project, I will test it for you and try to resolve the issue. 

      

    Regards, 

    Fletcher 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 2, 2018 7:20 AM
  • I'm using VS2015 14.0.25431.01, Update 3.
    Monday, April 2, 2018 8:47 AM
  • I tried it in my VS2015 with update 3, and i still got this:

    Please make sure you changed the Property via Right-click the TabControl:

     

    Regards, 

    Fletcher 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Wednesday, April 4, 2018 7:42 AM
    Wednesday, April 4, 2018 7:41 AM
  •  Hello Fletch Zhou,

    Thanks for the reply, even i'm getting the same result as displayed above, but my question was when we add tabpages in MainTabControl collections can't we get control name for tabpage not for maintabcontrol?

    MainTabControl -> Parent (Displayed as controlname by CodedUI)

    tabPage (Added in collections) -> child

    Can we get controlname for child control?


    Wednesday, April 4, 2018 9:03 AM
  • Hi,

    One possible reason is that you add assertion on the wrong control.

    You add it like this screen shot 1:

    But if you add it like this screenshot 2, you would get the correct name:

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 5, 2018 4:56 AM