public void GetOpenPopupsTest() { UITester.Dispatcher.Invoke(() => { var tutorialManager = ((Sample.MainWindowViewModel)UITester.MainWindow.DataContext).TutorialManager; tutorialManager.Start(); UITester.MainWindow.Activate(); var popups = WPFHelper.GetOpenPopups(); Assert.AreEqual(popups.Count, 1); }); }