public virtual void TestTearDown() { try { if (TestContext.CurrentContext.Result.Outcome != ResultState.Success) { Screenshot.Attach(); } TestLogs.AddSection($"Test {TestContext.CurrentContext.Test.Name} Ends"); TestLogs.Attach(); } catch (Exception e) { throw new Exception($"Teardown failed. Urgent attention required!!! Exception: \n {e}"); } finally { WebDriver.Dispose(); DriverService.Dispose(); } }
public void TestCleanup() { BaseDriverService.Dispose(); }