コード例 #1
0
 public SearchResultsPage SearchForProduct(string productName)
 {
     SearchInput.Clear();
     SearchInput.SendKeys(productName);
     SubmitSearchButton.Click();
     return(new SearchResultsPage(driver));
 }
コード例 #2
0
 // 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.
 }
コード例 #3
0
 public void SearchCompany(string ticker)
 {
     SearchBar.SendKeys(ticker);
     SubmitSearchButton.Click();
 }