Example #1
0
 public void StartUpTest()
 {
     extent.CreateTest(TestContext.CurrentContext.Test.Name);
     browser = new Browsers();
     browser.Init();
     Pages = new Pages(browser);
 }
 public void SetUp()
 {
     InitBrowser("Firefox");
     WaitClass.Driver = driver;
     driver.Manage().Window.Maximize();
     extent.CreateTest(TestContext.CurrentContext.Test.Name);
     ExcelTool.ExcelFilePath = xlFilePath;
 }
Example #3
0
 public void StartUp()
 {
     extent = new ExtentReportsHelper();
     extent.CreateTest(TestContext.CurrentContext.Test.Name);
     ResolveDependency.RegisterAndResolveDependencies();
     Session.StartBrowser();
     extent.SetStepStatusPass("Successfully opened browser session");
 }
Example #4
0
        public void GivenPrecondition2()
        {
            extent1.CreateTest("To validate Tshirt purchase scenario end to end");
            webutil.LaunchApp(ConfigurationManager.AppSettings["BaseUrl"]);
            webutil.login("*****@*****.**", "PRACTICE");

            extent1.SetStepStatusPass("GIVEN user is loggged in to the Shopping Portal");
        }
Example #5
0
        public void ClassCleanup()
        {
            // Runs once after all tests in this class are executed. (Optional)
            // Not guaranteed that it executes instantly after all tests from the class.
            var status = TestContext.CurrentContext.Result.Outcome.Status;

            if (status == TestStatus.Failed && ExtentReportsHelper.GetTest() == null)
            {
                ExtentReportsHelper.CreateTest(TestContext.CurrentContext.Test.Name);
                ExtentReportsHelper.LogFail(null, "Test Fail.");
            }

            BaseValues.ExtentReports.Flush();

            // Disppose the instance of webdriver
            BaseDriver.StopBrowser();
            CleanUpAllDriver();
        }
Example #6
0
 public void TestInit()
 {
     // Create Test Set
     ExtentReportsHelper.CreateTest(TestContext.CurrentContext.Test.Name);
 }
Example #7
0
 public void GivenPrecondition1()
 {
     extent1.CreateTest("Validate launch of Scottish Widows Home Page");
     extent1.SetStepStatusPass("GIVEN the guest user knows the url details of Scottish Widows");
 }
Example #8
0
 public void SetUp()
 {
     Driver.Manage().Window.Maximize();
     extent.CreateTest(TestContext.CurrentContext.Test.Name);
 }
Example #9
0
 public void StartUpTest()
 {
     extent.CreateTest(TestContext.CurrentContext.Test.Name);
 }
Example #10
0
 public void GivenPrecondition1()
 {
     extent1.CreateTest("Validate API response");
     extent1.SetStepStatusPass("Given the user know the api details");
 }