Esempio n. 1
0
 public void ScreenshotReport()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         SeleniumReporter.TakeScreenshot(driver, TestContext.CurrentContext.Test.Name);
     }
     else
     {
         SeleniumReporter.DeleteScreenshotIfExist(TestContext.CurrentContext.Test.Name);
     }
 }
Esempio n. 2
0
 public void ScreenshotReport()
 {
     if (TestContext.CurrentContext.Result.FailCount > 0)
     {
         //SeleniumReporter.TakeScreenshot(driver, TestContext.CurrentContext.Test.FullName.Remove(0,26)); // removing project name part
     }
     else
     {
         SeleniumReporter.DeleteScreenshotIfExist(SeleniumReporter.GetScreenshotFullPath(TestContext.CurrentContext.Test.FullName.Remove(0, 26)));
     }
 }