public void OneTimeSetup() { LogGenerator.ConnfigureLogger(); LogGenerator.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name); ReportTestManager.CreateParentTest(GetType().Name); }
public void Teardown() { LogGenerator.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name); ReportTestManager.LogStatus(); // close the driver specific to thread Driver().Quit(); }
public void InitializeTest() { LogGenerator.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name); // instantiate method according to browser type input SetDriver(browserType); // set wait time to load application completely. Driver().Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(60); // set wait time for loading DOM to get element irrespective of application loaded completely or not // Driver().Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); ReportTestManager.CreateTest(TestContext.CurrentContext.Test.Name); // lounch application LounchApplication(); }
public void CleanUp() { try { var screenshotPath = string.Empty; TestStatus status = TestContext.CurrentContext.Result.Outcome.Status; if (status == TestStatus.Failed) { _takeScreenshot = new TakeScreenshot(_parallelConfig); screenshotPath = _takeScreenshot.Capture(TestContext.CurrentContext.Test.Name); } ReportTestManager.FinalizeTest(_parallelConfig.Driver.Url, screenshotPath); _parallelConfig.Driver.Close(); _parallelConfig.Driver.Quit(); } catch { ReportTestManager.FinalizeTest(); _parallelConfig.Driver.Close(); _parallelConfig.Driver.Quit(); } }
public void ReportInitialize() { SetFrameworkSettings(); ReportTestManager.CreateParentTest(GetType().Name); }
public void Initialize() { ReportTestManager.CreateTest(TestContext.CurrentContext.Test.Name); InitializeSettings(); }