Exemple #1
0
        /// <summary>
        /// Verify the navigation control for the page
        /// </summary>
        private void VerifyNavigation()
        {
            Wait1Sec.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector(HeaderPom.ByNavLogo)));

            HeaderPom.HeaderTestData.HomeText.MatchesActual(HeaderPom.NavHome.Text, "Nav Home");
            HeaderPom.HeaderTestData.QuoteText.MatchesActual(HeaderPom.NavQuote.Text, "Nav Quote");
            HeaderPom.HeaderTestData.AboutUsText.MatchesActual(HeaderPom.NavAboutUs.Text, "Nav About Us");

            HeaderPom.HeaderTestData.HomeLink.MatchesActual(HeaderPom.NavHome.GetAttribute("href"), "Nav Home Link");
            HeaderPom.HeaderTestData.QuoteLink.MatchesActual(HeaderPom.NavQuote.GetAttribute("href"), "Nav Quote Link");
            HeaderPom.HeaderTestData.AboutUsLink.MatchesActual(HeaderPom.NavAboutUs.GetAttribute("href"), "Nav About Us Link");
        }
Exemple #2
0
        /// <summary>
        /// Verify the company information section has the correct text and the map from google is being displayed
        /// </summary>
        private void VerifyCompanyInformation()
        {
            AboutUsPom.AboutUsTestData.AddressText.MatchesActual(AboutUsPom.AddressText.Text, "Address Text");

            AboutUsPom.AboutUsTestData.PhoneText.MatchesActual(AboutUsPom.PhoneText.Text, "Phone Text");

            AboutUsPom.AboutUsTestData.EmailText.MatchesActual(AboutUsPom.EmailText.Text, "Email Text");

            AboutUsPom.AboutUsTestData.MobileText.MatchesActual(AboutUsPom.MobileText.Text, "Mobile Text");

            Wait1Sec.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector(AboutUsPom.ByMap)));
        }
Exemple #3
0
        /// <summary>
        /// Verify the side navigation control for the page
        /// </summary>
        /// <remarks>
        /// This is only present on small screen sizes, the browser window will have to be resized correctly for this function to work
        /// </remarks>
        private void VerifySideNavigation()
        {
            ResizeScreen(ScreenType.Tiny);

            Wait1Sec.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector(HeaderPom.ByNavLogo)));

            HeaderPom.HeaderTestData.HomeText.MatchesActual(HeaderPom.SideNavHome.GetAttribute("innerText"), "Side Nav Home");
            HeaderPom.HeaderTestData.QuoteText.MatchesActual(HeaderPom.SideNavQuote.GetAttribute("innerText"), "Side Nav Quote");
            HeaderPom.HeaderTestData.AboutUsText.MatchesActual(HeaderPom.SideNavAboutUs.GetAttribute("innerText"), "Side Nav About Us");

            HeaderPom.HeaderTestData.HomeLink.MatchesActual(HeaderPom.SideNavHome.GetAttribute("href"), "Side Nav Home Link");
            HeaderPom.HeaderTestData.QuoteLink.MatchesActual(HeaderPom.SideNavQuote.GetAttribute("href"), "Side Nav Quote Link");
            HeaderPom.HeaderTestData.AboutUsLink.MatchesActual(HeaderPom.SideNavAboutUs.GetAttribute("href"), "Side Nav About Us Link");

            ResizeScreen(ScreenType.Large);
        }
        /// <summary>
        /// Verify the display of the page, all display checks will be called from here
        /// </summary>
        private void VerifyDisplay()
        {
            FooterPom.FooterTestData.CopyrightText.MatchesActual(FooterPom.Copyright.Text, "Copyright Information");

            Wait1Sec.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector(FooterPom.ByLogo)));
        }
Exemple #5
0
        /// <summary>
        /// Verify the company history section has the correct text and the image is being displayed
        /// </summary>
        private void VerifyCompanyHistory()
        {
            AboutUsPom.AboutUsTestData.CompanyHistoryText.MatchesActual(AboutUsPom.CompanyHistory.Text, "Company History");

            Wait1Sec.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector(AboutUsPom.ByCompanyHistoryImage)));
        }