Example #1
0
 private void DisposeWebDriverInstance()
 {
     if (BaseWebDriver.IsNotNull())
     {
         BaseWebDriver.Quit();
         BaseWebDriver.Dispose();
         BaseWebDriver = null;
     }
 }
Example #2
0
 public void TeardownTest()
 {
     try
     {
         driver.Quit();
         driver.Close();
     }
     catch (Exception)
     {
         // Ignore errors if unable to close the browser
     }
     screenRecorder.StopRecording(TestContext.CurrentTestOutcome);
 }
        /// <summary>
        /// Kill selenium driver and residue processes
        /// </summary>
        private void DisposeResources()
        {
            try
            {
                if (BaseWebDriver != null)
                {
                    BaseWebDriver.Quit();

                    BaseWebDriver = null;
                }

                StopSeleniumServer();
                KillDrivers();
            }
            catch (Exception) { }
            finally { SeleniumServer = null; }
        }
 /// <summary>
 /// Closes driver instance and every other window associated with it
 /// </summary>
 public void CloseDriver()
 {
     BaseWebDriver.Quit();
 }