コード例 #1
0
 public static void TestFixtureteardown1()
 {
     if (Globalclass.driver != null)
     {
         ReportResultUtility.EndReportResultString();
         ReportResultUtility.WriteToHtmlFile(ReportResultUtility.reportResultHtmlString.ToString(), Globalclass.resultlocation + ".html");
         Globalclass.driver.Quit();
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public static void CreateReport(String content, String filename)
 {
     ReportResultUtility.EndReportResultString();
     ReportResultUtility.WriteToHtmlFile(content, filename);
 }