private static IE FindIEPartiallyInitialized(Constraint findBy) { var allBrowsers = new ShellWindows2(); var context = new ConstraintContext(); foreach (IWebBrowser2 browser in allBrowsers) { var ie = new IE(browser, false); if (ie.Matches(findBy, context)) { return(ie); } } return(null); }