locked
Coded UI with Context menus RRS feed

  • Question

  • Hi all;

    Kindly, I have a question regarding Coded UI with context menu . I have a desktop application with menu bar like File,Edit,View options in each menu

    When opening a menu like File menu and dragging the cross hair icon to the File menu, it is disappeared as the focus transferred from it .

    My Question Now.

    How can I assert this context menu options ?

    Looking forward to your replies.............

    Monday, February 10, 2014 11:56 AM

Answers

  • Hi,

    Generally we can use key combination: Win+I or Ctrl+I to locate context menus.

    If you are using VS2010 on a machine which is not Windows 8, you should use Win+I.

    If you are using VS2012 or later, you can use Ctrl+I.

    Reference:

    Coded UI Test – Tip of the Day #1 - Win+I to locate controls

    Where did Win+I go?

    You just have to hover your mouse cursor over the expected a context menu option and press key combination. This will highlight the selected control and show its properties in the Coded UI Test Builder properties window. You can now add this control to the UI Control Map or add an assertion on its properties.

    If you want to add assertions for all context menus under File at the same time, I am afraid that it is not possible. We only add assertion for a control once.

    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 Thursday, February 13, 2014 9:17 AM
    • Marked as answer by Amanda Zhu Monday, February 17, 2014 1:48 AM
    Tuesday, February 11, 2014 6:07 AM

All replies

  • Hi,

    1.Open code dui test builder

    2.Click on the cross hair

    3.dont drag the cross hair

    4.Place the mouse cursor on the menu item you want

    5.Press Ctrl + I

    All the control details will come up in the test builder

    Monday, February 10, 2014 1:53 PM
  • Hi Channella;

    I tried the above procedure you stated, but still with no result. the same issue occurs .

    I need to keep the context menu open until I drag the crosshair icon to it and assert all its options.

    Monday, February 10, 2014 3:05 PM
  • Hi,

    Generally we can use key combination: Win+I or Ctrl+I to locate context menus.

    If you are using VS2010 on a machine which is not Windows 8, you should use Win+I.

    If you are using VS2012 or later, you can use Ctrl+I.

    Reference:

    Coded UI Test – Tip of the Day #1 - Win+I to locate controls

    Where did Win+I go?

    You just have to hover your mouse cursor over the expected a context menu option and press key combination. This will highlight the selected control and show its properties in the Coded UI Test Builder properties window. You can now add this control to the UI Control Map or add an assertion on its properties.

    If you want to add assertions for all context menus under File at the same time, I am afraid that it is not possible. We only add assertion for a control once.

    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 Thursday, February 13, 2014 9:17 AM
    • Marked as answer by Amanda Zhu Monday, February 17, 2014 1:48 AM
    Tuesday, February 11, 2014 6:07 AM