Example #1
0
        public void HomePageTestStart()
        {
            var homePage = new HomeP();

            Check.Equals(homeTitle, driver.Title, false, "Titles aren't equal");
            test.Log(LogStatus.Pass, "Title is correct");
        }
Example #2
0
        public void Initialize()
        {
            test        = extent.StartTest(TestContext.CurrentContext.Test.Name);
            _test.Value = test;
            var homePage = new HomeP();

            test.Log(LogStatus.Info, "Opening base page");
            homePage.OpenStartPage(baseURL);
            Assert.IsTrue(homePage.IsHomePageOpened());
            test.Log(LogStatus.Pass, "Home page is opened");
        }
Example #3
0
        public void ChangeLocation()
        {
            var homePage = new HomeP();

            test.Log(LogStatus.Info, "Click location selector");
            homePage.ClickLocationSelector();
            test.Log(LogStatus.Info, "Click Ukraine location");
            homePage.SelectUALOcation();
            Check.Equals(uaLocationLink, driver.Url, true, "test");
            test.Log(LogStatus.Pass, "Location changed to Ukraine");
        }
        public void SearchTest()
        {
            var homePage = new HomeP();

            test.Log(LogStatus.Info, "Searching for selenium");
            homePage.SearchForItem("selenium");
            var firstUrl = homePage.GetFirstUrl();

            Check.Equals(firstUrl, expectedUrl);
            test.Log(LogStatus.Pass, "First url is " + expectedUrl);
            Check.IsTrue(homePage.IsWikipediaUrlDisplayed());
            test.Log(LogStatus.Pass, "Wikipedia url is displayed on the page");
            Check.IsTrue(homePage.IsHabrahabrUrlDisplayed());
            test.Log(LogStatus.Pass, "Habrahabr url is displayed on the page");
            Check.IsTrue(homePage.IsFeaturedSnippetDisplayed());
            test.Log(LogStatus.Pass, "Featured snippet is displayed on the page");
        }
Example #5
0
        public void OpenVacanciesPage()
        {
            var homePage = new HomeP();

            test.Log(LogStatus.Info, "Click menu button");
            homePage.ClickMenuButton();
            Check.IsTrue(homePage.IsGamburgerMenuOpened());
            test.Log(LogStatus.Pass, "Gamburger menu is opened");
            test.Log(LogStatus.Info, "Click Itera Link");
            homePage.ClickYouAtIteraLink();
            Check.IsTrue(homePage.IsGamburgerMenu2Opened());
            test.Log(LogStatus.Pass, "Gamburger menu is opened");
            test.Log(LogStatus.Info, "Click Vacancies Link");
            homePage.ClickVacanciesLink();
            var vacanciesPage = new VacanciesP();

            Check.IsTrue(vacanciesPage.IsVacanciesPageDisplayed());
            test.Log(LogStatus.Pass, "Vacancies page is opened");
        }
Example #6
0
        public void VacanciesStartTest()
        {
            var homePage = new HomeP();

            homePage.OpenStartPage(baseURL);
            test.Log(LogStatus.Info, "Open vacancies page");
            homePage.GoToVacanciesPage();
            var vacanciesPage = new VacanciesP();

            Check.IsTrue(vacanciesPage.IsVacanciesPageDisplayed());
            test.Log(LogStatus.Pass, "Vacancies page is opened");
            Check.IsTrue(vacanciesPage.IsVacanciesDisplayed());
            test.Log(LogStatus.Pass, "List of vacancies is displayed");
            Check.IsTrue(vacanciesPage.IsNetVacanciesDisplayed());
            test.Log(LogStatus.Pass, "Net vacanices are displayed in list(at least one)");
            var titles = vacanciesPage.PrintTitles();

            test.Log(LogStatus.Info, "Print list of titles: " + titles + " ");
            var numbers = vacanciesPage.NumberOfVacancies();

            test.Log(LogStatus.Info, "Number of vacancies: " + numbers);
        }
        public void HomePageGoogleStart()
        {
            var homePage = new HomeP();

            Check.Equals(title, driver.Title, false, wrongTitle);
        }