public void Quit() { driver.Close(); driver.Quit(); driver.Dispose(); driver = null; }
public void Quit() { if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed) { var fileName = TestContext.CurrentContext.TestDirectory + "\\" + DateTime.Now.ToString("yy-MM-dd-HH-mm-ss-FFF") + "-" + GetType().Name + "-" + TestContext.CurrentContext.Test.FullName + "." + ScreenshotImageFormat.Jpeg; try { ((ITakesScreenshot)driver).GetScreenshot().SaveAsFile(fileName, ScreenshotImageFormat.Jpeg); TestContext.AddTestAttachment(fileName); } catch (Exception e) { Console.WriteLine(e); } } driver.Close(); driver.Quit(); driver.Dispose(); driver = null; }
public void Cleanup() { driver.Quit(); driver.Dispose(); }
public void CloseDriver() { m_driver.Dispose(); WebDriver = null; }