예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
            }
        }