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

                IControl dropdowncontrol = DS_StudyProperties.LabDropDown;

                Control_ActionUtilities.Click(dropdowncontrol, "Not able to click on dropdowncontrol");
                IControl selectValueInDropdown = DS_StudyProperties.LabDropDownOptions;

                string        selectValue    = Control_PropertyUtilities.GetText(selectValueInDropdown);
                bool          found          = false;
                List <String> dropdownvalues = Control_ActionUtilities.Dropdown_GetItems(dropdowncontrol, out found);
                if (found)
                {
                    bool comparison = DL_Lab_MRR_Table.AreListsEqual(dropdown, dropdownvalues);
                }
                return(true);
            }

            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
            }
            return(false);
        }
 internal static bool VerifySearchedItems(IControl listbox, String searchText)
 {
     try
     {
         bool          found = false;
         List <String> items = Control_ActionUtilities.Dropdown_GetItems(listbox, out found);
         if (found)
         {
             foreach (String item in items)
             {
                 if (!item.Contains(searchText))
                 {
                     return(false);
                 }
             }
         }
         return(true);
     }
     catch (Exception e)
     {
         new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
     }
     return(false);
 }