CodedUI test fails on Lab VMs when run from MTM RRS feed

  • Question

  • Hi,

    I have just started running my codedui tests from mtm.The tests are something like this.

    1.Launch mmc

    2.Launch a wizard from one of the nodes by right clicking and selecting New

    3.The wizard opens

    4.Perform actions


    6.Exit MMC

    The tests are all failing at step 3.

    Prob 1.Step 2 does click on New but the test runner doesnot wait till the wizard opens.It immediately runs the test cleanup code ie step 6.

    Because of this all my tests fail.But when I run it locally from my machine,they do all PASS.

    The test runner waits till the wizard opens and completes all the steps..

    Is there a way to fix this so that the test run smooth from MTM also.

    Below is the error :

    Cannot perform 'Click' on the hidden control. Additional Details:
    TechnologyName:  'MSAA'
    Name:  'New'
    ControlType:  'MenuItem'
     ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F002


    Prob 2.Seems like the mouse clicks on message box or confirmation box are not actually performed ,because of this also,few test fails.

    Pls hel me with your suggestions.




    Wednesday, August 25, 2010 5:15 AM

All replies

  • Sam,

    The exception indicates that the "New" menuitem hasn't been clicked.

    Can you confirm if the new menu item in the context menu was clicked?



    Please mark this post as answer if this answers your question
    Wednesday, August 25, 2010 6:18 AM
  • Hi Vishnu,

    Yes ,Click on the New menu item is either not performed at all or even though performed ,the wizard does not open up during the automation test run.

    but,when it is performed manually,the wizard never failed to open.

    Can you please let me know how to capture if it is actually performed the Click action?(any logging any where else)

    pls let me know if you need any further info..



    Wednesday, August 25, 2010 8:46 AM