public SearchResultsPage SearchForProduct(string productName) { SearchInput.Clear(); SearchInput.SendKeys(productName); SubmitSearchButton.Click(); return(new SearchResultsPage(driver)); }
// The search is initiated from the homepage but returns a value on the searchPage and so we need a driver for the search page to check the result so we pass one to it. internal SearchPage Search(string itemToSearchFor) { SearchBox.SendKeys(itemToSearchFor); SubmitSearchButton.Submit(); _logger.Info($"Searched for item: {itemToSearchFor}"); return(new SearchPage(Driver)); // return a new searchPage driver because it returns the result to the search page and we need to then // do stuff on that searchPage. }
public void SearchCompany(string ticker) { SearchBar.SendKeys(ticker); SubmitSearchButton.Click(); }