public void careersFilterSkills() { String result_PageTitle; String expected_title = "data"; MainPage home_page = new MainPage(driver); home_page.goToPage(); CareersPage final_page = home_page.goto_careers(); final_page.test_searchSkills(); //SearchPage final_page = careers_page.test_searchSkills(); // 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(); if (result_PageTitle.ToLower().Contains(expected_title) || driver.Url.ToLower().Contains(expected_title)) { Console.WriteLine("Search Test Passed"); } else { Console.WriteLine("Search Test Failed"); } }