protected virtual void TestFixtureSetUp() { string installationPath = GetInstallationPath(); _previousCurrentDirectory = Environment.CurrentDirectory; Environment.CurrentDirectory = installationPath; Application = new IsolatedApplicationRunner(); Application.Start(GetArguments()); MainWindow = AutomationWrapper.FromHandle(Application.Handle); MainMenu = MainWindow.Children.Single(p => p.ControlType == ControlType.MenuBar); // Because we're accessing the application through automation, // the requery mechanism doesn't work anymore (it depends on mouse // and keyboard actions to be triggered). To work around this, Net IDE // exposes a Button with the Guid below as the name of the control. // When we click this, a require is fired immediately. var handle = InteropUtil.FindWindowInProcess( Process.GetCurrentProcess(), "89db2dd3-10f4-43f7-a09c-8b1d1038f137" ); _requeryElement = AutomationWrapper.FromHandle(handle); }