Exemplo n.º 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 void TC002_VerifyDateRangeFieldInFilterBar(String Bname)
        {
            TestFixtureSetUp(Bname, "TC002-Verify Date Range Field in Filter bar.");
            try
            {
                loginPage.navigateToLoginPage().verifyLoginPageScreenInDetail();
                loginPage.loginUsingValidEmailIdAndPassword();

                homePage.verifyHomePage().clickUserMenuAndSelectAccountFromList("QA Testing - Promo");
                homePage.clickSiteNavigationMenuIconAndSelectOptionFromListOnPage("Dashboard");

                promoDashboard.verifyFilterBarSectionOnScreen(false);
                string[] opt = { "Custom Range", "Today", "Yesterday", "Last 7 Days", "Last 14 Days", "Last Month", "Last 3 Months", "Last 6 Months", "Year To Date", "Last Year" };
                promoDashboard.clickOnFilterFieldAndVerifyOrClickOptions("Days", "", opt);
                promoDashboard.verifyFromDateAndToDatePickerOnScreen();
            }
            catch (Exception e)
            {
                Logging.LogStop(this.driver, test, e, MethodBase.GetCurrentMethod(), Bname + "_TestSuite008_FilterBar_TC002");
                throw;
            }
            driver.Quit();
        }
Exemplo n.º 3
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));
        }