Ejemplo n.º 1
0
        private void SelectByTextOrValue(Attribute findBy)
        {
            OptionCollection options = Options.Filter(findBy);

            foreach (Option option in options)
            {
                option.Select();
            }

            if (options.Length == 0)
            {
                throw new SelectListItemNotFoundException(findBy.Value);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This method clears the selected items in the select box and waits for the
        /// onchange event to complete after the list is cleared
        /// </summary>
        public void ClearList()
        {
            Logger.LogAction("Clearing selection(s) in " + GetType().Name + " '" + Id + "'");

            OptionCollection options = Options.Filter(GetIsSelectedAttribute());

            foreach (Option option in options)
            {
                option.ClearNoWait();
            }

            if (options.Length > 0)
            {
                WaitForComplete();
            }
        }