public SearchResultsPage SearchText(string searchText) { SearchBtn.Click(); TextBoxHelper.TypeInTextBox(SearchTextBox, searchText); Searchbox.Click(); return(new SearchResultsPage(driver)); }
internal SearchPg SearchFunctionalityValidation(string searchKeyword) { SearchField.SendKeys(searchKeyword); SearchBtn.Click(); _logger.Info($"Searched for an item in the search bar=>{searchKeyword}"); return(new SearchPg(Driver)); }
/// <summary> /// Seaching from page /// </summary> /// <param name="Anything"> what you searching for</param> public void Search(string Anything) { SearchTxt.Clear(); SearchTxt.SendKeys(Anything); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); SearchBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); }
internal InventoryPage Search() { Wait.MLSeconds(200); Wait.UntilClickAble(SearchBtn); Wait.Second(1); SearchBtn.Click(); Wait.AM_Loaging_ShowAndHide(); return(this); }
public AccountsPage SearchForAccount(string AccountNumber) { Thread.Sleep(500); GetAccountsField.Clear(); GetAccountsField.SendKeys(AccountNumber); Thread.Sleep(500); SearchBtn.Click(); return(new AccountsPage(WebDriver)); }
/// <summary> /// Enters text into the top left hand Search field, clicks Go, then waits for the Search Results page to load /// </summary> /// <param name="textToEnter">The text you want to enter into the Search field</param> /// <returns></returns> public SearchResultsPage Search(string textToEnter) { SearchTxt.Clear(); SearchTxt.SendKeys(textToEnter); SearchBtn.Click(); SearchResultsPage page = new SearchResultsPage(Browser); page.WaitForInitialize(); return(page); }
public void ClickOnSearchButton() { if (SearchBtn.Displayed) { SearchBtn.Click(); Thread.Sleep(3000); } else { throw new Exception("Element is not found or not clickable"); } }
public void Search() { IWebElement SearchBox; SearchBox = Driver.Instance.FindElement(By.Id("searchData")); SearchBox.SendKeys(search); IWebElement SearchBtn; SearchBtn = Driver.Instance.FindElement(By.ClassName("searchBtn")); SearchBtn.Click(); WebDriverWait wait8 = new WebDriverWait(Driver.Instance, new TimeSpan(0, 0, 30)); wait8.Until(ExpectedConditions.ElementToBeClickable(By.LinkText("2"))).Click(); }
private void AddSearchTerm(PropsalModel Data) { this.OpenTermDialog(Data.InventoryType); this.FillSerachTerms(Data); SearchBtn.Click(); Wait.UntilLoading(TableRecords); Wait.Second(1); if (!TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Enabled) { Modal.Close(); throw new Exception(String.Format("Inventory is not available on given search Terms = {0}", Data.SearchTerms[0])); } else { TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Click(); } Wait.MLSeconds(100); AdToProposalBtn.Click(); }
/// <summary> /// Clicks the user-specified button or link and then waits for a window to close or open, or a page to load, /// depending on the button that was clicked /// </summary> /// <param name="buttonOrLinkElem">The element to click on</param> public dynamic ClickToAdvance(IWebElement buttonOrLinkElem) { if (Browser.Exists(Bys.GCEPLibraryPage.SearchBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == SearchBtn.GetAttribute("outerHTML")) { SearchBtn.Click(); // Browser.WaitForElement(Bys.EducationCenterPage.MyCoursesTtl, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); //Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); new WebDriverWait(Browser, TimeSpan.FromSeconds(15)).Until(ExpectedConditions.UrlContains("Courses.aspx")); return(new EducationCenterPage(Browser)); // } } } if (Browser.Exists(Bys.GCEPLibraryPage.BeginCourseBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == BeginCourseBtn.GetAttribute("outerHTML")) { BeginCourseBtn.Click(); return(new CourseTestPage(Browser)); } } if (Browser.Exists(Bys.GCEPLibraryPage.TranscriptLnk)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == TranscriptLnk.GetAttribute("outerHTML")) { TranscriptLnk.Click(); Browser.WaitForElement(Bys.GCEPTranscriptPage.CompletedTestTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); return(new GCEPTranscriptPage(Browser)); } } else { throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button."); } return(null); }
/// <summary> /// Clicks search icon /// </summary> private void ClickSearch() { try { if (IsWebElementPresent(SearchBtn)) { SearchBtn.Click(); waitForResultsPanelLoad(); Reporter.Pass("ClickSearch", "Search is hit successfully"); } else { Reporter.Fail("ClickSearch", "Failed to hit search"); } } catch (Exception ClickSearchException) { throw ClickSearchException; } }
/// <summary> /// Selecting a value from the Status dropdown, Entering text in the name text box and clicking search /// </summary> /// <param name="UserStatus">Select user status from dropdown</param> /// <param name="UserName">passing username</param> public void SearchForUserByStatusAndName(String UserStatus, String UserName) { Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(180), ElementCriteria.IsNotVisible); StatusSelElem.SelectByValue(UserStatus); SearchTxt.Clear(); SearchTxt.SendKeys(UserName); Browser.WaitForElement(Bys.AMAPage.SearchBtn, TimeSpan.FromSeconds(180), ElementCriteria.IsEnabled, ElementCriteria.IsVisible); try { Thread.Sleep(0500); SearchBtn.Click(); } catch (InvalidOperationException) { SearchTxt.SendKeys(Keys.Enter); SearchTxt.SendKeys(Keys.Enter); } // StatusSelElem.SelectByValue(UserStatus); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); }
public void Search() { SearchField.SendKeys("Hello"); SearchBtn.Click(); }
public void SearchHotel() { SearchBtn.Click(); }
public void DoSearch() { SearchBtn.Click(); }