locked
ApplicationUnderTest Class throwing exception when topwindow is in hidden mode RRS feed

  • Question

  • Hi,

       Our application have a workflow where we hide the top window and show another window which is child of Topwindow. While writing  UTs using coded UI, we are using ApplicationUnderTest.FromProcess(processObj) API to get AUT. This API is throwing exception when our top window is in hidden mode saying cannot found the top window.Because of that we are unable to get the AUT even the process is running.

    Could you please help us to resolve this issue.

    Regards,

    Nagasree.

    Tuesday, April 26, 2016 7:05 AM

Answers

  • Hi Nagasree,

    When do you use the ApplicationUnderTest.FromProcess(processObj)? Is it used after the top window hidden?

    If the windows is hidden and you want to do any operation for this window, it will throw exception about can't find some controls or the root container of the hidden window. It is a correct action for UI Test. So please try move this line code before the top window hidden to check whether this problem can be resolved.

    If the problem still exist, please share some code snippet and detailed information about your test project to help us reproduce your problem in our side, which can help us find out how to deal with this problem in your situation.

    Best Regards,
    Weiwei


    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 Weiwei Cai Wednesday, May 4, 2016 9:55 AM
    • Edited by Weiwei Cai Thursday, May 5, 2016 1:43 AM
    • Marked as answer by Weiwei Cai Thursday, May 5, 2016 1:43 AM
    Wednesday, April 27, 2016 7:22 AM