//declare methods //enter flight detials and click continue and assert for select flight page public void EnterFlightDetails(string from, string to) { WebDriverWait wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(60)); wait.Until(ExpectedConditions.ElementIsVisible(By.Name(DepartFrom.GetAttribute("Name")))); JourneyType.Click(); SelectElement departfrom = new SelectElement(DepartFrom); departfrom.SelectByValue(from); SelectElement arriveat = new SelectElement(ArriveAt); arriveat.SelectByValue(to); ServiceClass.Click(); ContinueBtn.Click(); //Wait for next page load and assert for title of that page wait.Until(ExpectedConditions.TitleContains("Select a Flight")); Assert.That(_driver.Title, Contains.Substring("Select a Flight")); }