Example #1
0
        // function to select traveller details
        public OneWayFlight SelectAndApplyTravellersDetails()
        {
            // select and apply traveller details
            UICommands.Click(driver, CommonElementGroup.selectAdultTraveller);

            UICommands.Click(driver, CommonElementGroup.selectChildrenTraveller);

            UICommands.Click(driver, CommonElementGroup.selectInfantTraveller);

            //TestLogs.info("OneWayFlight-  traveler details selected");

            return(this);
        }
Example #2
0
        // search city with autocomplete
        public static void selectCity(IWebDriver driver, By byTxtEnterCity, String searchText)
        {
            // find textbox to enter value
            IWebElement txtSelectTextBox = driver.FindElement(byTxtEnterCity);

            // clear the text if existing
            txtSelectTextBox.Clear();

            // enter text in textbox
            txtSelectTextBox.SendKeys(searchText);

            // always select the firet option from autocomplete
            By selectFirstoption = By.XPath("//*[@class='autoComplete']/li[1]/a[1 and contains(text(), '" + searchText + "')]");

            UICommands.Click(driver, selectFirstoption);

            //TestLogs.info("OneWayFlight-  city selected");
        }