コード例 #1
0
        /// <summary>
        /// Close web driver, quit and dispose.
        /// </summary>
        public void Close()
        {
            if (GetDriver != null)
            {
                System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
                GetDriver.Close();
                GetDriver.Quit();
                GetDriver.Dispose();
                System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
                GetDriver = null;
            }

            System.Threading.Thread.Sleep(TimeSpan.FromSeconds(1));
        }
コード例 #2
0
 /// <summary>
 /// This method is closing browser with all tabs.
 /// </summary>
 public static void CloseBrowser()
 {
     GetDriver.Quit();
     GetDriver.Dispose();
     CloseSession();
 }