public void Initialize() { ExtentReports extentReports = ReportingManager.Instance; extentReports.LoadConfig(Directory.GetParent(TestContext.CurrentContext.TestDirectory).Parent.FullName + "\\extent-config.xml"); //Note we have hardcoded the browser, we will deal with this later extentReports.AddSystemInfo("Browser", "Firefox"); _reportingTasks = new ReportingTasks(extentReports); _reportingTasks.InitializeTest(); }
public void Setup() { // Save a reference to the current Test's log in its TestContext TestContext.Set("log", ""); // Log the test attributes of the current [Test] Log.StandardAttributes(); // Log Before Action Log.BeforeAction(); // Perform the action try { BeginReporting(); _reportingTasks.InitializeTest(); Session.Create(); // Set WebDriver's window to full screen AppBase.Maximize(); // Delete all cookies AppBase.DeleteAllCookies(); // Logging - After action success Log.Success(); } catch (Exception e) { // Logging - After action exception Log.Failure(e.Message); // Fail current test Assert.Fail(e.Message); } finally { // Logging - After action Log.Finally(); } }
public void SetUp() { //Init test Name to log _reportingTasks.InitializeTest(); var Description = TestContext.CurrentContext.Test.Properties.Get("Description")?.ToString() ?? string.Empty; _reportingTasks.Log(Status.Info, "<h4> Tests' steps description </h4>" + Description + "<br>"); //Init Web driver driver = WebDriverFactory.GetWebDriver(browserName); _reportingTasks.Log(Status.Debug, "<b>Tests are executed in " + browserName); EventFiringWebDriver firingDriver = new EventFiringWebDriver(driver); firingDriver.ExceptionThrown += FiringDriver_TakeScreenshotOnException; firingDriver.ElementClicked += FiringDriver_Cliked; firingDriver.Navigated += FiringDriver_Navigate; driver = firingDriver; driver.Manage().Timeouts().ImplicitWait = _config.ImplicitlyWait; driver.Manage().Timeouts().PageLoad = _config.PageLoadWait; //init Page Manager _pages = new PagesManager(driver); //Checking user authorization IsLogin(user); }
public void TestSetup() { _reportingTasks.InitializeTest(); driver.Navigate().GoToUrl("http://127.0.0.1:4001/wordpress/"); }
public void TestSetup() { reportingTasks.InitializeTest(); Browser.Initialize(); }
public void startTest() { Console.WriteLine("Set Up"); reporter.InitializeTest(); }