public LandingPage openApplication()
        {
            driver.Url = "https://www.bestdotnettraining.com/";
            //span[contains(text(),'×')]
            driver.Manage().Timeouts().PageLoad     = TimeSpan.FromSeconds(60);
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(60);
            //Thread.Sleep(10000);
            //driver.FindElement(By.XPath("span[contains(text(),'×')]")).Click();
            //driver.FindElement(By.XPath("div[@id='modalAd']/div/div/div/button")).Click();
            driver.FindElement(By.XPath("//div[@id='modalAd']/div/div/div/button")).Click();
            LandingPage lpage = new LandingPage(driver);

            PageFactory.InitElements(driver, lpage);
            return(lpage);
        }
Example #2
0
        public void login()
        {
            test = extent.StartTest(testcaseName);

            setup("chrome");
            LaunchingPage lp = new LaunchingPage(driver, test);

            PageFactory.InitElements(driver, lp);
            LandingPage lpage1 = lp.openApplication();

            PageFactory.InitElements(driver, lpage1);
            HomePage hp1 = lpage1.SignIn();

            PageFactory.InitElements(driver, hp1);
            PackagesMenu pm = hp1.Packages();

            PageFactory.InitElements(driver, pm);
            pm.goldmembership();
            test.Log(LogStatus.Pass, "goldmembership page open");

            // driver.Quit();
        }