예제 #1
0
        public void SelectValue(Func <IElement> element, string optionValue)
        {
            var el = element() as Element;

            if (el.IsSelect)
            {
                var sl = new WatiNCore.SelectList(this.browser.DomContainer, el.AutomationElement.NativeElement);
                sl.SelectByValue(optionValue);
                fireOnChange(el.AutomationElement);
            }
        }
예제 #2
0
 public void SelectValue(ElementProxy element, string optionValue)
 {
     this.Act(CommandType.Action, () =>
     {
         var el = element.Element as Element;
         if (el.IsSelect)
         {
             var sl = new WatiNCore.SelectList(this.ActiveDomContainer, el.AutomationElement.NativeElement);
             sl.SelectByValue(optionValue);
             fireOnChange(el.AutomationElement);
         }
     });
 }
예제 #3
0
        public void MultiSelectValue(Func <IElement> element, string[] optionValues)
        {
            var el = element() as Element;

            if (el.IsSelect && el.IsMultipleSelect)
            {
                var sl = new WatiNCore.SelectList(this.browser.DomContainer, el.AutomationElement.NativeElement);
                foreach (var val in optionValues)
                {
                    sl.SelectByValue(val);
                    fireOnChange(el.AutomationElement);
                }
            }
        }
예제 #4
0
 public void MultiSelectValue(ElementProxy element, string[] optionValues)
 {
     this.Act(CommandType.Action, () =>
     {
         var el = element.Element as Element;
         if (el.IsSelect && el.IsMultipleSelect)
         {
             new WatiNCore.SelectList(this.browser.Frame("").DomContainer, el.AutomationElement.NativeElement);
             var sl = new WatiNCore.SelectList(this.ActiveDomContainer, el.AutomationElement.NativeElement);
             foreach (var val in optionValues)
             {
                 sl.SelectByValue(val);
                 fireOnChange(el.AutomationElement);
             }
         }
     });
 }
 public void SelectValue(Func<IElement> element, string optionValue)
 {
     var el = element() as Element;
     if (el.IsSelect)
     {
         var sl = new WatiNCore.SelectList(this.browser.DomContainer, el.AutomationElement.NativeElement);
         sl.SelectByValue(optionValue);
         fireOnChange(el.AutomationElement);
     }
 }
 public void MultiSelectValue(Func<IElement> element, string[] optionValues)
 {
     var el = element() as Element;
     if (el.IsSelect && el.IsMultipleSelect)
     {
         var sl = new WatiNCore.SelectList(this.browser.DomContainer, el.AutomationElement.NativeElement);
         foreach (var val in optionValues)
         {
             sl.SelectByValue(val);
             fireOnChange(el.AutomationElement);
         }
     }
 }
 public void SelectValue(ElementProxy element, string optionValue)
 {
     this.Act(CommandType.Action, () =>
     {
         var el = element.Element as Element;
         if (el.IsSelect)
         {
             var sl = new WatiNCore.SelectList(this.ActiveDomContainer, el.AutomationElement.NativeElement);
             sl.SelectByValue(optionValue);
             fireOnChange(el.AutomationElement);
         }
     });
 }
 public void MultiSelectValue(ElementProxy element, string[] optionValues)
 {
     this.Act(CommandType.Action, () =>
     {
         var el = element.Element as Element;
         if (el.IsSelect && el.IsMultipleSelect)
         {
             new WatiNCore.SelectList(this.browser.Frame("").DomContainer, el.AutomationElement.NativeElement);
             var sl = new WatiNCore.SelectList(this.ActiveDomContainer, el.AutomationElement.NativeElement);
             foreach (var val in optionValues)
             {
                 sl.SelectByValue(val);
                 fireOnChange(el.AutomationElement);
             }
         }
     });
 }