Beispiel #1
0
        public void NavigationToTabs()
        {
            HomePage homePage = new HomePage(driver);

            //Navigate to BuyTab;
            homePage.ClickBuyTab();
            string buyPageUrl = homePage.GetUrl();

            Assert.AreEqual(EnvironmentUrl + "/", buyPageUrl);
            Console.WriteLine("Buy Page is opened");

            //Navigate to RentTab
            RentPage rentPage = homePage.ClickRentTab();

            Assert.IsNotNull(rentPage);
            Assert.AreEqual(EnvironmentUrl + "/?mode=rent", homePage.GetUrl());
            Console.WriteLine("Rent page is opened");

            //Navigate to NewHomesTab
            NewHomesPage newHomesPage = homePage.ClickNewHomeTab();

            Assert.IsNotNull(newHomesPage);
            Assert.AreEqual(EnvironmentUrl + "/new-homes", homePage.GetUrl());
            Console.WriteLine("New homes page is opened");

            //Navigate to SoldTab
            SoldPage soldPage = homePage.ClickSoldTab();

            Assert.IsNotNull(soldPage);
            Assert.AreEqual(EnvironmentUrl + "/?mode=sold", homePage.GetUrl());
            Console.WriteLine("Sold Page is opened");

            //Navigate to RuralTab
            RuralPage ruralPage = homePage.ClickRuralTab();

            Assert.IsNotNull(ruralPage);
            Assert.AreEqual(EnvironmentUrl + "/rural", homePage.GetUrl());
            Console.WriteLine("Rural page is opened");

            //Navigate to SignupPage
            SignUpPage signupPage = homePage.ClickSingUpButton();

            Assert.IsNotNull(signupPage);
            Assert.IsTrue(driver.Url.Contains("https://auth.domain.com.au/v1/signup"));
            Console.WriteLine("Signup Page is opened");
            signupPage.goBack();
            //Re-verify the rural page is visible again
            Assert.AreEqual(EnvironmentUrl + "/rural", homePage.GetUrl());
            Console.WriteLine("Rural page is opened again");
        }
Beispiel #2
0
        public void TestNavigationOfHomePageTabs()
        {
            HomePage home = new HomePage(driver);

            home.goToPage();
            Assert.IsNotNull(home);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/");
            test.Log(LogStatus.Pass, "Home Page Loaded successfully");

            RentPage rentPage = home.goToRentPage();

            Assert.IsNotNull(rentPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/?mode=rent");
            test.Log(LogStatus.Pass, "Rent Page Loaded successfully");



            NewHomesPage newHomesPage = rentPage.goToNewHomesPage();

            Assert.IsNotNull(newHomesPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/new-homes");
            test.Log(LogStatus.Pass, "New Homes Page Loaded successfully");

            SoldPage soldPage = newHomesPage.goToSoldPage();

            Assert.IsNotNull(soldPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/?mode=sold");
            test.Log(LogStatus.Pass, "Sold Page Loaded successfully");


            CommercialPage commercialPage = soldPage.goToCommercialPage();

            Assert.IsNotNull(commercialPage);
            Assert.AreEqual(driver.Url, "https://www.commercialrealestate.com.au/");
            test.Log(LogStatus.Pass, "Commercial Page Loaded successfully");

            home = commercialPage.goBackToDomainPage();
            Assert.IsNotNull(home);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/");
            test.Log(LogStatus.Pass, "Home Page ReLoaded successfully");

            SellPage sellPage = home.goToSellPage();

            Assert.IsNotNull(sellPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/sell?hp=1");
            test.Log(LogStatus.Pass, "Sell Page Loaded successfully");

            NewsPage newsPage = sellPage.goToNewsPage();

            Assert.IsNotNull(newsPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/news/");
            test.Log(LogStatus.Pass, "News Page Loaded successfully");


            AgentsPage agentsPage = newsPage.goToAgentsPage();

            Assert.IsNotNull(agentsPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/real-estate-agents/");
            test.Log(LogStatus.Pass, "Agents Page Loaded successfully");


            MorePage morePage = agentsPage.goToMorePage();

            Assert.IsNotNull(morePage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/home?mode=share");
            test.Log(LogStatus.Pass, "More Page Loaded successfully");


            IWebElement savedTab = morePage.goToSavedSearchesPage();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Assert.IsNotNull(savedTab);
            test.Log(LogStatus.Pass, "Saved Searches Page Loaded successfully");


            IWebElement shortListTab = morePage.goToShortListpropertyPage();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Assert.IsNotNull(shortListTab);
            test.Log(LogStatus.Pass, "Shortlist Property Page Loaded successfully");


            SignInPage signInPage = morePage.goTosignInPageTab();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            Assert.IsNotNull(signInPage);
            Assert.IsTrue(driver.Url.Contains("https://auth.domain.com.au/v1/login?signin"));
            signInPage.goBack();
            test.Log(LogStatus.Pass, "SignIn Page Loaded successfully");


            SignUpPage signUpPage = morePage.goTosignUpPageTab();

            Assert.IsNotNull(signUpPage);
            Assert.IsTrue(driver.Url.Contains("https://auth.domain.com.au/v1/signup?signin"));
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            test.Log(LogStatus.Pass, "SignUp Page Loaded successfully");
        }