예제 #1
0
        public static bool CheckOrder()
        {
            List <IWebElement> listElements = SiteDriver.FindElements(ManCityObject.elementList, "CSSSelector");
            List <string>      listTitle    = new List <string>();

            foreach (IWebElement e in listElements)
            {
                listTitle.Add(e.Text);
            }
            return(SiteDriver._IsOrdered(listTitle, lst));;
        }
예제 #2
0
        public static bool CheckOrder1()
        {
            // SiteDriver.MoveToElement(SiteDriver.FindElements(ManCityObject.elementList1, "CSSSelector"));
            List <IWebElement> listElements1 = SiteDriver.FindElements(ManCityObject.elementList1, "CSSSelector");
            List <string>      listTitle     = new List <string>();

            foreach (IWebElement e in listElements1)
            {
                listTitle.Add(e.GetAttribute("title"));
            }
            return(SiteDriver._IsOrdered(listTitle, lst1));
        }
예제 #3
0
        public void CheckElementsOrder()
        {
            DemoMainPageService.ClickOnDemo();
            List <string> lst = new List <string>()
            {
                "Full Name", "Gender", "Email", "Username", "Password", "City", "State", "Zip Code", "Contact No", "Introduce yourself", "What are your hobbies", "Favourite Food", "Select Skills", "Country", "Favourite Item A", "Favourite Item B", "Favourite Item C", "Favourite Item D", "Favourite Item E", "Favourite Item F", "Favourite Item G", "Favourite Item I", "Favourite Item J", "Favourite Item K", "Favourite Item L", "Favourite Item L", "Favourite Item N", "Favourite Item O", "Favourite Item P", "Favourite Item Q", "Favourite Item R", "Favourite Item S"
            };
            List <IWebElement> listElements1 = SiteDriver.FindElements(PersonalityTestPageObject.elementsList, "CSSSelector");
            List <string>      listElements  = new List <string>();

            foreach (IWebElement e in listElements1)
            {
                listElements.Add(e.Text);
            }
            Assert.True(SiteDriver._IsOrdered(listElements, lst));
        }
예제 #4
0
        public void CheckFoodOrder()
        {
            DemoMainPageService.ClickOnDemo();
            List <string> lst = new List <string>()
            {
                "Pizza", "Burger", "Sandwich", "Chapati"
            };
            List <IWebElement> listElements1 = SiteDriver.FindElements(PersonalityTestPageObject.foodList, "CSSSelector");
            List <string>      listFood      = new List <string>();

            foreach (IWebElement e in listElements1)
            {
                listFood.Add(e.Text.Trim());
            }
            Assert.True(SiteDriver._IsOrdered(listFood, lst));
        }
예제 #5
0
        public void CheckGenderOrder()
        {
            DemoMainPageService.ClickOnDemo();
            List <string> lst = new List <string>()
            {
                "optionFemale", "optionMale", "optionOther"
            };
            List <IWebElement> listElements1 = SiteDriver.FindElements(PersonalityTestPageObject.gender, "CSSSelector");
            List <string>      listGender    = new List <string>();

            foreach (IWebElement e in listElements1)
            {
                listGender.Add(e.GetAttribute("id"));
            }
            Assert.True(SiteDriver._IsOrdered(listGender, lst));
        }