Example #1
0
        /// <summary>
        /// Verify Records on Reports Screen
        /// </summary>
        /// <returns></returns>
        public Schedule verifyRecordsOnReportScreen()
        {
            if (driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No items were found')]") || driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No results found')]"))
            {
                PromoDashboard promoDashboard = new PromoDashboard(driver, test);
                promoDashboard.clickOnFilterFieldAndVerifyOrClickOptions("Days", "Last 6 Months");
            }

            return(new Schedule(driver, test));
        }
        public IWebDriver TestFixtureSetUp(string Bname, string testCaseName)
        {
            driver = StartBrowser(Bname);
            Common.CurrentDriver = driver;
            Results.WriteTestSuiteHeading(typeof(TestSuite005_PromoExportFunctionality).Name);
            starttest(Bname + " - " + testCaseName, typeof(TestSuite005_PromoExportFunctionality).Name);

            loginPage      = new Login(driver, test);
            homePage       = new Home(driver, test);
            searchPage     = new Search(driver, test);
            promoDashboard = new PromoDashboard(driver, test);

            return(driver);
        }
Example #3
0
        public IWebDriver TestFixtureSetUp(string Bname, string testCaseName)
        {
            driver = StartBrowser(Bname);
            Common.CurrentDriver = driver;
            Results.WriteTestSuiteHeading(typeof(TestSuite006_Schedulers).Name);
            starttest(Bname + " - " + testCaseName, typeof(TestSuite006_Schedulers).Name);

            loginPage          = new Login(driver, test);
            homePage           = new Home(driver, test);
            brandCanada_Screen = new BrandCanada_Screen(driver, test);
            searchPage         = new Search(driver, test);
            promoDashboard     = new PromoDashboard(driver, test);
            schedule           = new Schedule(driver, test);

            return(driver);
        }
Example #4
0
        /// <summary>
        /// Verify Report Screen Details
        /// </summary>
        /// <returns></returns>
        public Schedule verifyReportScreenDetails()
        {
            string[] menuIcons = { "User", "Files", "Help", "Search" };
            verifyMenuIconOnTopOfScreen(menuIcons);
            driver._waitForElementToBeHidden("xpath", "//span[@class='lead' and contains(text(),'Loading Pivot Data')]");

            if (driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No items were found')]") || driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No results found')]"))
            {
                PromoDashboard promoDashboard = new PromoDashboard(driver, test);
                promoDashboard.clickOnFilterFieldAndVerifyOrClickOptions("Days", "Last 6 Months");
            }

            IList <IWebElement> buttons = driver.FindElements(By.XPath("//div[contains(@class,'btn-group btn-grid-actions')]//.//button"));

            string[] buttonNames  = { "Export Grid", "Schedule", "View Selected", "Reset Selected", "Export All", "View Selected", "Reset Selected", "Field Options" };
            string[] buttonStatus = { null, "true", "true", "true", null, "true", "true", null };
            int      cnt          = 0;

            for (int i = 0; i < buttons.Count; i++)
            {
                for (int j = 0; j < buttonNames.Length; j++)
                {
                    if (buttons[i].Text.Contains(buttonNames[j]) == true)
                    {
                        if (buttonNames[j] != "Schedule")
                        {
                            Assert.AreEqual(buttons[i].GetAttribute("disabled"), buttonStatus[j], "'" + buttonNames[j] + "' Button not Enable or Disable on Screen.");
                        }
                        cnt++;
                        break;
                    }
                }
            }

            Assert.AreEqual(cnt, buttonNames.Length, "Button Name not found on Screen.");
            Results.WriteStatus(test, "Pass", "Verified, Buttons on screen.");

            Assert.AreEqual(true, driver._isElementPresent("xpath", "//div[@ag-grid='pivotCtrl.gridOptions']"), "'Pivot Grid' not Present on screen.");
            verifyPaginationForGridSection();
            verifyThumbnailSectionOnScreen();

            Results.WriteStatus(test, "Pass", "Verified, Report Screen Details.");
            return(new Schedule(driver, test));
        }
        /// <summary>
        /// Verify Promo Dashboard Screen
        /// </summary>
        /// <returns></returns>
        public BrandCanada_Screen verifyBrandCanadaScreen()
        {
            string[] menuIcons = { "User", "Files", "Help", "Search" };
            Schedule schedule  = new Schedule(driver, test);

            schedule.verifyMenuIconOnTopOfScreen(menuIcons);

            driver._waitForElementToBeHidden("xpath", "//span[@class='lead' and contains(text(),'Loading Pivot Data')]");

            Assert.AreEqual(true, driver._isElementPresent("id", "filter-menu"), "'Filter Bar' not Present on Screen.");
            if (driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No items were found')]") || driver._isElementPresent("xpath", "//span[@class='lead' and contains(text(),'No results found')]"))
            {
                PromoDashboard promoDashboard = new PromoDashboard(driver, test);
                promoDashboard.clickOnFilterFieldAndVerifyOrClickOptions("Days", "Last 6 Months");
            }

            Results.WriteStatus(test, "Pass", "Verified, Brand Canada Screen.");
            return(new BrandCanada_Screen(driver, test));
        }