/// <summary> /// Creates a new instance of an Internet Explorer browser. /// </summary> /// <returns> An instance of an Internet Explorer browser. </returns> public static Browser Create() { var browser = new InternetExplorer(CreateInternetExplorerClass()); browser.Refresh(); return(browser); }
/// <summary> /// Attempts to attach to an existing browser. /// </summary> /// <returns> An instance of an Internet Explorer browser. </returns> public static Browser Attach() { var foundBrowser = GetBrowserToAttachTo(); if (foundBrowser == null) { return null; } var browser = new InternetExplorer(foundBrowser); browser.Refresh(); return browser; }
/// <summary> /// Attempts to attach to an existing browser. /// </summary> /// <returns> An instance of an Internet Explorer browser. </returns> public static Browser Attach() { var foundBrowser = GetBrowserToAttachTo(); if (foundBrowser == null) { return(null); } var browser = new InternetExplorer(foundBrowser); browser.Refresh(); return(browser); }
/// <summary> /// Attempts to attach to an existing browser. /// </summary> /// <returns> The browser instance or null if not found. </returns> public static Browser Attach(Process process) { if (process.ProcessName != Name) { return(null); } var foundBrowser = GetBrowserToAttachTo(process.Id); if (foundBrowser == null) { return(null); } var browser = new InternetExplorer(foundBrowser); browser.Refresh(); return(browser); }
/// <summary> /// Attempts to attach to an existing browser. /// </summary> /// <returns> The browser instance or null if not found. </returns> public static Browser Attach(Process process) { if (process.ProcessName != BrowserName) { return null; } var foundBrowser = GetBrowserToAttachTo(process.Id); if (foundBrowser == null) { return null; } var browser = new InternetExplorer(foundBrowser); browser.Refresh(); return browser; }
/// <summary> /// Creates a new instance of an Internet Explorer browser. /// </summary> /// <returns> An instance of an Internet Explorer browser. </returns> public static Browser Create() { var browser = new InternetExplorer(CreateInternetExplorerClass()); browser.Refresh(); return browser; }