Tests hang when a click launched a modal window

May 16, 2012 at 9:50 AM

I have written the code below to click the Help Menu and click a sub item "Report A bug"

I have used customUIItems as these have been implemented using DevExpress


and also the white click doesnt work for me so i have been using the patterns in AutomatedElements



 Window window = _application.GetWindow(SearchCriteria.ByAutomationId("MainWindow"), InitializeOption.NoCache);

 var toplevelItem = window.Get<ToolBarItem>ByAutomationId("Help"));
var reportABug = window.Get<BarButtonItem>(SearchCriteria.ByAutomationId("ReportaBug"));

at the this point my test hangs and the next set of statements are not executed.

could you tell me why?

What the app does is that it displays a modal window when the report A Bug is clicked on.

And i am trying to get some value from teh modal window

but the tests hang on


I would appreciate some insights.