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();
        }
示例#2
0
 /// <summary>
 /// find a student
 /// </summary>
 public void FindAStudent()
 {
     //TODO: need data object
     //SearchField.SendKeys("");
     SearchField.SendKeys(Data.ToString());
     SearchButton.Click();
 }
示例#3
0
 public void ActionsForm(GoogleModel action)
 {
     SearchInput.SendKeys("Selenium");
     Logo.Click();
     SearchButton.Click();
     SeleniumResult.Click();
 }
示例#4
0
        /// <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);
            });
        }
示例#5
0
 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);
            }
        }
示例#8
0
        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);
            }
        }
示例#10
0
        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();
        }
示例#12
0
        //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;
            }
        }
示例#13
0
 public static void TypeAndSearch(string searchText)
 {
     SearchTextbox.Clear();
     SearchTextbox.SendKeys(searchText);
     SearchButton.Click();
     CurrentDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
 }
示例#14
0
 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");
 }
示例#15
0
 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();
 }
示例#17
0
 public SearchResultPage InputValueInTheSearchBar(Route route, IWebDriver Driver)
 {
     GoArrivalCityButton.Click();
     GoArrivalCityInput.SendKeys(route.ArrivalCity);
     GoArrivalCityInput.SendKeys(Keys.Enter);
     SearchButton.Click();
     return(new SearchResultPage(Driver));
 }
示例#18
0
 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);
 }
示例#19
0
        public string Searching(string searchdata)
        {
            SearchTextbox.Click();
            SearchTextbox.SendKeys(searchdata);
            SearchButton.Click();
            string AfterSearchTitle = webdriver.Title;

            return(AfterSearchTitle);
        }
示例#20
0
 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");
        }
示例#22
0
        public static void Search(string SearchString, string SearchType)
        {
            var radioButton = GetRarioButtonByValue(SearchType);

            radioButton.Checked = true;
            SearchBox.Text      = SearchString;
            SearchButton.Click();
            BAT.Browser.WaitUntilReady();
        }
示例#23
0
        public string Search()
        {
            string searchText = SearchWord.Text;

            SearchField.Click();
            SearchField.SendKeys(searchText);
            SearchButton.Click();
            return(SearchedTitle.Text);
        }
示例#24
0
 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");
     }
 }
示例#26
0
 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);
 }
示例#27
0
 public void ClickSearch()
 {
     try
     {
         SearchButton.Click();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         Console.WriteLine(ex.InnerException);
         throw;
     }
 }
示例#28
0
        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();
        }
示例#29
0
 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);
 }
示例#30
0
        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 + "]");
            }
        }