public static void TestFixtureteardown1() { if (Globalclass.driver != null) { ReportResultUtility.EndReportResultString(); ReportResultUtility.WriteToHtmlFile(ReportResultUtility.reportResultHtmlString.ToString(), Globalclass.resultlocation + ".html"); Globalclass.driver.Quit(); } }
public static void TestTeardown() { var resultlocation = getnormalizedLocation("resultlocation"); if (TestContext.CurrentContext.Result.Outcome.ToString().Equals("Failed")) { Screenshot ss = ((ITakesScreenshot)Globalclass.driver).GetScreenshot(); var saveScreenshotInToFolder = Globalclass.resultlocation + ".jpeg"; ss.SaveAsFile(saveScreenshotInToFolder, ScreenshotImageFormat.Jpeg); ReportResultUtility.EndReportResultString(); ReportResultUtility.WriteToHtmlFile(ReportResultUtility.reportResultHtmlString.ToString(), Globalclass.resultlocation + ".html"); Globalclass.driver.Quit(); Globalclass.driver = null; } }
public static void CreateReport(String content, String filename) { ReportResultUtility.EndReportResultString(); ReportResultUtility.WriteToHtmlFile(content, filename); }