Пример #1
0
        public static void TypeAndSelectDestination(string elementID, string panelID, string userInput)
        {
            IWebElement input = Driver.Instance.FindElement(By.Id(elementID));

            if (!WebControls.TypeAndSelectDestinationValue(input, panelID, userInput, false))
            {
                int count = 0;
                while (!WebControls.TypeAndSelectDestinationValue(input, panelID, userInput, true))
                {
                    if (count == 3)
                    {
                        throw new Exception(string.Format("\"{0}\" cannot be found.", userInput));
                    }
                    count++;
                }
            }
        }
Пример #2
0
 public static void SelectCheckOut(string toDate)
 {
     Logger.AddSelectAction(toDate, "as Checkout date");
     WebControls.SelectDateBox("toDate", "/html/body/div[3]", toDate);
 }
Пример #3
0
 public static void SelectCheckIn(string fromDate)
 {
     Logger.AddSelectAction(fromDate, "as Checkin date");
     WebControls.SelectDateBox("fromDate", "/html/body/div[2]", fromDate);
 }
Пример #4
0
        public static void TypeDestination(string destination, bool isHotel)
        {
            Logger.AddTypeAction(destination, " in Destination field");

            WebControls.TypeAndSelectDestination("Destination", "ui-id-1", destination);
        }