Esempio n. 1
0
        public static bool VerifyValuesInDropdown(List <DropDownInfo> dropdownInfoList, String fieldName)
        {
            try
            {
                List <string> dropdown = new List <string>();
                foreach (DropDownInfo dropdownInfo in dropdownInfoList)
                {
                    dropdown.Add(dropdownInfo.Dropdown);
                }

                IControl dropdowncontrol = DL_Lab_MRR_Table.GetDropdownInvoker(fieldName);
                Control_ActionUtilities.Click(dropdowncontrol, "Not able to click on dropdowncontrol");
                IControl selectValueInDropdown = DL_Lab_MRR_Table.GetSelectValueFromDropdown;
                string   selectValue           = Control_PropertyUtilities.GetText(selectValueInDropdown);
                ReadOnlyCollection <IControl> dropdowncontrollist = DL_Lab_MRR_Table.GetDropdownItems();
                List <string> dropdownvalues = new List <string>();
                // dropdownvalues.Add(selectValue);
                foreach (IControl control in dropdowncontrollist)
                {
                    string dropdownvalue = Control_PropertyUtilities.GetText(control);
                    dropdownvalues.Add(dropdownvalue);
                }
                bool comparison = DL_Lab_MRR_Table.AreListsEqual(dropdown, dropdownvalues);
                return(comparison);
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }