Example #1
0
        public void OneTimeSetup()
        {
            LogGenerator.ConnfigureLogger();

            LogGenerator.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);
            ReportTestManager.CreateParentTest(GetType().Name);
        }
Example #2
0
        public void Teardown()
        {
            LogGenerator.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().Name);

            ReportTestManager.LogStatus();


            // close the driver specific to thread
            Driver().Quit();
        }
Example #3
0
        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();
        }
Example #4
0
 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();
     }
 }
Example #5
0
 public void ReportInitialize()
 {
     SetFrameworkSettings();
     ReportTestManager.CreateParentTest(GetType().Name);
 }
Example #6
0
 public void Initialize()
 {
     ReportTestManager.CreateTest(TestContext.CurrentContext.Test.Name);
     InitializeSettings();
 }