public void EndTest() { driver.Close(); _reportingTasks.FinalizeTest(); //_reportingTasks.CleanUpReporting(); //driver.Manage().Cookies.DeleteAllCookies(); }
public void TearDown() { // Log Before Action Log.BeforeAction(); // Perform the action try { // Check if the Test that is ending was a failure if (NUnit.Framework.TestContext.CurrentContext.Result.Outcome != NUnit.Framework.Interfaces.ResultState.Success) { // Take screenshot of the failure state AppBase.TakeScreenshot(); } _reportingTasks.FinalizeTest(); //_reportingTasks.CleanUpReporting(); // Quit this driver, closing every associated window. AppBase.Quit(); // Logging - After action success Log.Success(); } catch (Exception e) { // Logging - After action exception Log.Failure(e.Message); // Fail current test Assert.Fail(e.Message); } finally { // Logging - After action Log.Finally(); // Print log to console (for Visual Studio and Bamboo) string log = TestContext.Get("log").ToString(); if (log.Length > 0) { Console.WriteLine(log); } } }
public void Cleanup() { _reportingTasks.FinalizeTest(driver); driver.Quit(); driver.Dispose(); }
public void TestCleanUp() { _reportingTasks.FinalizeTest(); driver.Manage().Cookies.DeleteAllCookies(); }
public void endTest() { Console.WriteLine("Tear Down"); reporter.FinalizeTest(); }