public void EnterTicketsData() { DepartureStationField.Click(); DepartureStationField.SendKeys("București"); DepartureStationMark.Click(); ArrivalStationField.Click(); ArrivalStationField.SendKeys("Madrid"); ArrivalStationMark.Click(); Thread.Sleep(15000); //DepartureDateField.Click(); //NextMonthButton.Click(); //Thread.Sleep(14000); DayOfDepartureButton.Click(); Thread.Sleep(14000); DayOfReturnButton.Click(); ConfirmDaysButton.Click(); Thread.Sleep(1000); SearchPassengerField.Click(); AdultPassengerPlusButton.Click(); ChildPassengerPlusButton.Click(); Thread.Sleep(1000); //ConfirmPassengersButton.Click(); Thread.Sleep(5000); SearchButton.Click(); }
/// <summary> /// find a student /// </summary> public void FindAStudent() { //TODO: need data object //SearchField.SendKeys(""); SearchField.SendKeys(Data.ToString()); SearchButton.Click(); }
public void ActionsForm(GoogleModel action) { SearchInput.SendKeys("Selenium"); Logo.Click(); SearchButton.Click(); SeleniumResult.Click(); }
/// <summary> /// Click Search Button /// </summary> /// <returns></returns> public void SearchButtonClick() { WebDriverWait wait = new WebDriverWait(context, TimeSpan.FromSeconds(10)); wait.Until(context => { try { SearchButton.Click(); } catch (Exception ex) { Type exType = ex.GetType(); if (exType == typeof(TargetInvocationException) || exType == typeof(NoSuchElementException) || exType == typeof(ElementClickInterceptedException) || exType == typeof(ElementNotVisibleException) || exType == typeof(InvalidOperationException)) { return(false); //By returning false, wait will still rerun the func. } else { throw; //Rethrow exception if it's not ignore type. } } return(true); }); }
public string FindBookingWithWrongSurname(Booking booking) { BookingSurname.SendKeys(booking.WrongSurname); SearchButton.Click(); Thread.Sleep(TimeSpan.FromSeconds(2)); return(ErrorMessage.Text); }
public GoogleSearchPage ClickSearchButton() { SearchButton.VisibleWait(); SearchButton.Click(); return(this); }
//Search the rental property internal bool SearchRentalPropertySuccessfully(String searchPropertyName) { Thread.Sleep(4000); //Enter the value in the search bar SearchBox.SendKeys(searchPropertyName); //Click on the search button SearchButton.Click(); int searchResultNum = Driver.driver.FindElements(By.XPath("//html//div[@class='ui three stackable cards']/div")).Count; if (searchResultNum != 0) { string ExpectValue = searchPropertyName; for (int i = 1; i <= searchResultNum; i++) { string ActualValue = Driver.driver.FindElement(By.XPath(String.Format(".//*[@id='mainPage']/div[4]/div['{0}']/div[2]/a", i))).Text; if (ActualValue.Equals(ExpectValue)) { return(true); } } return(false); } else { return(false); } }
public SearchResultPage FillSearchFieldAndClick() { SearchField.SendKeys("Blouse"); SearchButton.Click(); return(new SearchResultPage(Driver)); }
//Search the property internal bool SearchAPropertySuccessfully(String searchPropertyName) { try { Driver.WaitForElementVisible(Driver.driver, By.XPath("//input[@name='SearchString']"), 15); //Enter the value in the search bar SearchBar.SendKeys(searchPropertyName); //Click on the search button SearchButton.Click(); string ExpectValue = searchPropertyName; string ActualValue = FirstPropertyNameButton.Text; if (ActualValue.Equals(ExpectValue)) { return(true); } else { return(false); } } catch { return(false); } }
public void Seach() { txtSearchBox.Click(); DriverContext.Driver.Wait(); txtSearchBox.SendKeys(searchsamsung); SearchButton.Click(); DriverContext.Driver.Wait(); DriverContext.Driver.WaitForPageLoaded(); clickItem.Click(); //Aprove Contains Samsung string aproveItem = AproveSearchItem.Text; Assert.IsTrue(aproveItem.Contains(searchsamsung)); Console.WriteLine(aproveItem); clickHomePage.Click(); txtSearchBox.Click(); txtSearchBox.SendKeys(searchsamsung); SearchButton.Submit(); DriverContext.Driver.Wait(); DriverContext.Driver.WaitForPageLoaded(); //Item add basket addBasketItem.Click(); DriverContext.Driver.Wait(); }
public void ClickOnSearchButton() { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30)); wait.Until(condition => SearchButton.Displayed && SearchButton.Enabled); SearchButton.Click(); }
//Filter By Design name public static void FilterByDeisgnName() { log4net.Config.XmlConfigurator.Configure(); ILog logger = LogManager.GetLogger(typeof(MyProjectsPage)); test = Base.extent.CreateTest("VerifyListOfTemplates"); try { IList <IWebElement> templates = Element.getElements(BeforeTemplates); Console.WriteLine("Number of templates present in a page is " + templates.Count()); for (int i = 0; i < templates.Count; i++) { SearchBox.Type(templates[i].Text); Wait.WaitVisible(SearchButton); SearchButton.Click(); SearchBox.Type(Keys.Control + "a"); SearchBox.Type(Keys.Clear); MyProject.Click(); if (i == 0) { break; } } } catch (Exception e) { test.Fail("Filter by deisgn name failed" + e); Driver.Quit(); throw e; } }
public static void TypeAndSearch(string searchText) { SearchTextbox.Clear(); SearchTextbox.SendKeys(searchText); SearchButton.Click(); CurrentDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); }
internal void SearchMethod() { ExcelLib.PopulateInCollection(Base.ExcelPath, "PropertyDetails"); SearchBar.SendKeys(ExcelLib.ReadData(2, "PropertyName")); SearchButton.Click(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Property Searched Using Search Menu"); }
public string FindHotelsByDestinationWithoutGuests(Destination destination) { SearchInputLine.SendKeys(destination.EmptyDestination); ComeInDate.Click(); ChosenData.Click(); SearchButton.Click(); return(ErrorDiscovered.Text); }
public void NavigateToSearchResult(LoginPage loginPage) { loginPage.Navigate("https://www.google.com/"); SearchInput.SendKeys("Selenium"); Logo.Click(); SearchButton.Click(); SeleniumResult.Click(); }
public SearchResultPage InputValueInTheSearchBar(Route route, IWebDriver Driver) { GoArrivalCityButton.Click(); GoArrivalCityInput.SendKeys(route.ArrivalCity); GoArrivalCityInput.SendKeys(Keys.Enter); SearchButton.Click(); return(new SearchResultPage(Driver)); }
public void SelectHotelByStarGrade(IWebDriver driver, int Start) { Thread.Sleep(8000); // driver.FindElement(By.XPath("//input[@id = '"+Start+"']")).Click(); driver.FindElement(By.XPath("//label[@for='" + Start + "']")).Click(); SearchButton.Click(); //Thread.Sleep(6000); }
public string Searching(string searchdata) { SearchTextbox.Click(); SearchTextbox.SendKeys(searchdata); SearchButton.Click(); string AfterSearchTitle = webdriver.Title; return(AfterSearchTitle); }
public SearchResultPage Search(string textToType) { Navigate(); SearchBox.Clear(); SearchBox.SendKeys(textToType); SearchType.Click(); SearchButton.Click(); return(new SearchResultPage(this.driver)); }
public void SearchCompetency(string keyword) { KeywordsTextBox.SendKeys(keyword); SearchButton.Click(); Thread.Sleep(3000); Assert.AreEqual(keyword, CompetencyName.Text, keyword + " - Competency search was unsuccessfully and is not found in the Competency List"); ExtentReport.test.Log(LogStatus.Pass, keyword + " - Competency has been successfully searched and is present in the Competency List"); }
public static void Search(string SearchString, string SearchType) { var radioButton = GetRarioButtonByValue(SearchType); radioButton.Checked = true; SearchBox.Text = SearchString; SearchButton.Click(); BAT.Browser.WaitUntilReady(); }
public string Search() { string searchText = SearchWord.Text; SearchField.Click(); SearchField.SendKeys(searchText); SearchButton.Click(); return(SearchedTitle.Text); }
internal void QuickSearch() { SearchProductMenu.Click(); ResidentialMenu.Click(); AirConditionersandHeatPumpsMenu.Click(); HeatPumpsAndHeatPumpCoils.Click(); VerifyTableResults(); SearchButton.Click(); Assert.IsTrue(Utility.SearchResultsTableRowCount() > 1); }
public void ClickOnSearchButton() { if (SearchButton.Displayed) { SearchButton.Click(); } else { throw new Exception("Element is not found or not clickable"); } }
public string FindHotelsByDestination(Destination destination) { GuestDropDownList.Click(); NumberOfAdultsDropDownList.Click(); NumberOfAdultsDropDownList.SendKeys(OpenQA.Selenium.Keys.Down); ConfirmButton.Click(); SearchInputLine.SendKeys(destination.EmptyDestination); ComeInDate.Click(); ChosenData.Click(); SearchButton.Click(); return(ErrorDiscovered.Text); }
public void ClickSearch() { try { SearchButton.Click(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.InnerException); throw; } }
public void Action_Search(string series) { SearchButton.Click(); SearchTextBox.SendKeys(series); var formattedSeries = FormatSeries(series); var link = Driver.Instance.FindElement(By.XPath("//a[contains(@href, '" + formattedSeries + "')]")); if (link == null) { throw new NotFoundException($"Series named '{series}' not found!"); } link.OpenLink(); }
public GoogleLanding Click_SearchButton() { if (GetState("ResultsAvaible").Value == "false") { SearchButton.Click(); } else { SearchButton.ClearSearches(); SearchButton.AddSearch(By.CssSelector("button[value='Search']")); SearchButton.Click(); } return(this); }
public void Search(string SearchString) { try { log.WriteLine("Enter search string [" + SearchString + "]"); SearchField.SendKeys(SearchString); log.WriteLine("Click on Search button"); SearchButton.Click(); } catch (Exception e) { log.Error().WriteLine("MainPage::Search() exception raised [" + e.Message + "]"); } }