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++;
                }
            }
        }
Beispiel #2
0
 public static void SelectCheckOut(string toDate)
 {
     Logger.AddSelectAction(toDate, "as Checkout date");
     WebControls.SelectDateBox("toDate", "/html/body/div[3]", toDate);
 }
Beispiel #3
0
 public static void SelectCheckIn(string fromDate)
 {
     Logger.AddSelectAction(fromDate, "as Checkin date");
     WebControls.SelectDateBox("fromDate", "/html/body/div[2]", fromDate);
 }
Beispiel #4
0
        public static void TypeDestination(string destination, bool isHotel)
        {
            Logger.AddTypeAction(destination, " in Destination field");

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