コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: InternetExplorer.cs プロジェクト: BobbyCannon/TestR
        /// <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;
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
ファイル: InternetExplorer.cs プロジェクト: BobbyCannon/TestR
        /// <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;
        }
コード例 #6
0
ファイル: InternetExplorer.cs プロジェクト: BobbyCannon/TestR
 /// <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;
 }