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();
     }
 }
Example #2
0
 public void TestCleanup()
 {
     BaseDriverService.Dispose();
 }