Ejemplo n.º 1
0
        public void VerifyRedirectToContactUsPage(BrowserType type)
        {
            driver = DriverFactory.Create(type);
            driver.Navigate().GoToUrl(HOME_PAGE_URL);
            var mainPage = new MainPage(driver);

            mainPage.AcceptCookies();
            mainPage.ContactUs.Click();
            var contactPage = new ContactPage(driver);

            Assert.IsTrue(contactPage.IsOpened());
        }
Ejemplo n.º 2
0
        public void VerifyUnsuccessfulSearch(BrowserType type)
        {
            driver = DriverFactory.Create(type);
            driver.Navigate().GoToUrl(HOME_PAGE_URL);
            var mainPage = new MainPage(driver);

            mainPage.AcceptCookies();
            mainPage.Search("qwerty");
            var searchResult = new SearchResultsPage(driver);

            Assert.IsTrue(Waiter.WaitUntil(() => searchResult.NoResultsMessage.Displayed));
        }
Ejemplo n.º 3
0
        public void VerifyRedirectToVeracitySignInPage(BrowserType type)
        {
            driver = DriverFactory.Create(type);
            driver.Navigate().GoToUrl(HOME_PAGE_URL);
            var mainPage = new MainPage(driver);

            mainPage.AcceptCookies();
            Waiter.WaitUntil(() => mainPage.SingIn.Enabled);
            mainPage.SingIn.Click();
            var veracityLoginPage = new VeracityLoginPage(driver);

            Assert.IsTrue(Waiter.WaitUntil(() => veracityLoginPage.WelcomeMasage.Displayed));
        }
Ejemplo n.º 4
0
        public void VerifySuccessfulRegionChange(BrowserType type)
        {
            driver = DriverFactory.Create(type);
            driver.Navigate().GoToUrl(HOME_PAGE_URL);
            var mainPage = new MainPage(driver);

            mainPage.AcceptCookies();
            Waiter.WaitUntil(() => mainPage.RegionSelection.Enabled);
            mainPage.RegionSelection.Click();
            var randomRegion = mainPage.GetRegionsWithAddress().ElementAt(Random.GenerateRandomInt(mainPage.Regions.Count));

            mainPage.SelectRegion(randomRegion.Key);
            Assert.AreEqual(new Uri(randomRegion.Value).Host, new Uri(driver.Url).Host);
        }