public void BeforeClass() { try { string[] category = GetCategory(); string[] author = GetAuthor(); string description = GetDescription(); string strClassName = this.GetType().Name; // Create Report folder Utils.CreateReportFolder(); // Start Driver driver = new WebDriverMethod(); driver.Init(this.browser); // Init Html reporter NLogger.StartTestClass(strClassName, description); HtmlReporter.CreateExtentReport(); HtmlReporter.CreateTest(strClassName, description).AssignAuthor(author).AssignCategory(category); } catch (Exception ex) { string message = "An error occurs at BeforeClass"; throw new ErrorHandler(message, ex); } }
public static void BeforeTestRun() { driver = new WebDriverMethod(); driver.Init(); Utils.CreateReportFolder(); HtmlReporter.CreateExtentReport(); //HtmlReporter.AddSystemInfo(driver.GetDriver()); }
public void TestMethod1() { HtmlReporter.CreateExtentReport(); HtmlReporter.CreateTest("test"); WebDriverMethod driver = new WebDriverMethod(); driver.Init("firefox"); driver.OpenUrl("http://demo.automationtesting.in/Index.html"); //driver.CompareScreenshot("entry page"); driver.CompareScreenshot("Signin btn", By.Id("btn1")); driver.DestroyDriver(); }