public BookingStep2Page SelectJourney() { WaitForElementEnabledAndDisplayed(Link_Flight()); Driver.FindElement(Link_Flight()).Click(); while (ElementIsVisible(Spinner_Loader())) { Thread.Sleep(500); } WebElementExceptions.WaitForPageLoaded(); return(new BookingStep2Page(Driver)); }
protected void SelectOptionByValue(By element, String text) { try { WaitForElementEnabledAndDisplayed(element); SelectElement slct = new SelectElement(Driver.FindElement(element)); slct.SelectByValue(text); } catch (StaleElementReferenceException) { WebElementExceptions.WaitForPageLoaded(); SelectElement slct = new SelectElement(Driver.FindElement(element)); slct.SelectByValue(text); } }