Пример #1
0
        protected override void ProcessRecord()
        {
            if (ClearCookies)
            {
                Browser.CloseBrowsers(BrowserType.InternetExplorer);
                InternetExplorerBrowser.ClearCookies(CookieUri ?? string.Empty);
                Thread.Sleep(250);
                WriteObject(new InternetExplorerBrowser());
                return;
            }

            var browser = AttachExisting
                                ? InternetExplorerBrowser.AttachOrCreate()
                                : new InternetExplorerBrowser();

            WriteObject(browser);
            base.ProcessRecord();
        }
Пример #2
0
 protected override void ProcessRecord()
 {
     Browser.CloseBrowsers(BrowserType.InternetExplorer);
     InternetExplorerBrowser.ClearCookies(Uri ?? string.Empty);
     base.ProcessRecord();
 }