Beispiel #1
0
        public void TestingReportAppend()
        {
            //Pick the Report template
            string date = BaseTest.GetDate("MM/dd/yyyy h:mm tt");

            htmlContent = System.IO.File.ReadAllText(@"C:\SampleAutomationProject\SampleAutomationProject\Template\datatools.html").Replace("{date}", date);
            ////Fill the content in the htnl file
            ////Assign the file name to the result report
            htmlFileName = "Report_" + DateTime.Now.ToString("yyyy_MM_ddThh_mm_ss") + ".html";
            ////Assign location to the result report
            htmlFilePath = resultFolderPath + "\\" + htmlFileName;
            ////Write the report in the provided location
            System.IO.File.WriteAllText(resultFolderPath + "\\" + htmlFileName, htmlContent);
        }