Ejemplo n.º 1
0
        public void KeywordJobsSearch()
        {
            String expected_keyword = "lviv";
            String result_PageTitle;
            String search_string = "lviv";

            MainPage home_page = new MainPage(driver);

            home_page.goToPage();
            //home_page.test_search(search_string);

            // SearchPage search_page = new SearchPage(driver); ;
            CareersPage careers_page = home_page.goto_careers();

            careers_page.load_complete();

            SearchPage final_page = careers_page.test_search(search_string);

            // Ensure that the page load is complete
            final_page.load_complete();

            //As the web page is loaded, we just check if the page title matches or not.
            result_PageTitle = final_page.getPageTitle();

            Console.WriteLine(result_PageTitle.ToLower());
            Console.WriteLine(driver.Url.ToLower());

            if (result_PageTitle.Contains(expected_keyword) || driver.Url.ToLower().Contains(expected_keyword))
            {
                Console.WriteLine("Job Search Passed");
            }
            else
            {
                Console.WriteLine("Job Search Failed");
            }
        }