public bool InputOneAdultOneChild() { InputOriginCity.SendKeys("Budapest"); InputDestinationCity.SendKeys("Vienna"); InputPersons.Click(); IList <IWebElement> all = webDriver.FindElements(By.CssSelector(".stepper__button.stepper__button--add")); String[] allText = new String[all.Count]; int i = 0; foreach (IWebElement element in all) { allText[i++] = element.Text; } all[2].Click(); string disabled = all[2].GetAttribute("disabled"); if (disabled == null) { return(false); } else { return(true); } }
public bool InvertionOriginDestination() { InputOriginCity.SendKeys("Budapest"); InputDestinationCity.SendKeys("Vienna"); IList <IWebElement> all = webDriver.FindElements(By.CssSelector(".content__link1")); String[] allText = new String[all.Count]; int i = 0; foreach (IWebElement element in all) { allText[i++] = element.Text; } all[1].Click(); if (webDriver.Url == "https://wizzair.com/en-gb/flights/timetable") { return(true); } else { return(false); } }
public bool NewSerchCleaner() { InputOriginCity.SendKeys("Budapest"); InputDestinationCity.SendKeys("Vienna"); IList <IWebElement> all = webDriver.FindElements(By.CssSelector(".content__link1")); String[] allText = new String[all.Count]; int i = 0; foreach (IWebElement element in all) { allText[i++] = element.Text; } all[2].Click(); if (InputOriginCity.Text == "" && InputDestinationCity.Text == "") { return(true); } else { return(false); } }