public void DomainNameTest() { GoogleSearchPage googleSearchPage = new GoogleSearchPage(PropertiesCollection.driver); googleSearchPage.TypeInSearch("automation"); GoogleSearchResultPage googleSearchResultPage = googleSearchPage.StartSearch(); Assert.IsTrue(googleSearchResultPage.FindDomainNameInResultsPages("testautomationday.com", 5), "Domain is not found in results"); Console.WriteLine("Domain name should be present on first 5 result pages"); }
public void GoogleSearchTest() { GoogleSearchPage googleSearchPage = new GoogleSearchPage(PropertiesCollection.driver); googleSearchPage.TypeInSearch("automation"); GoogleSearchResultPage googleSearchResultPage = googleSearchPage.StartSearch(); googleSearchResultPage.OpenFirstResult(); Console.WriteLine("Title of : ' " + PropertiesCollection.driver.Title + "' , should contains searched data"); Assert.IsTrue(PropertiesCollection.driver.Title.ToLower().Contains("automation"), "Title doesn't contain searched data"); }