Пример #1
0
 protected virtual void OnSelecting(ItemListEventArgs args)
 {
     if (Selecting != null)
     {
         Selecting.Invoke(this, args);
     }
 }
Пример #2
0
        protected virtual void DefaultSelectByIndex(Select select, int index)
        {
            Selecting?.Invoke(this, new ElementActionEventArgs(select, index.ToString()));

            var nativeSelect = new SelectElement(WrappedElement);

            nativeSelect.SelectByIndex(index);
            WrappedElement     = null;
            ShouldCacheElement = false;
            Selected?.Invoke(this, new ElementActionEventArgs(select, nativeSelect.SelectedOption.Text));
        }
Пример #3
0
        public virtual void SelectByText(string value)
        {
            Selecting?.Invoke(this, new ComponentActionEventArgs(this, value));

            if (WrappedElement.Text != value)
            {
                WrappedElement.SendKeys(value);
            }

            Selected?.Invoke(this, new ComponentActionEventArgs(this, value));
        }
Пример #4
0
        protected virtual void DefaultSelectByText(Select select, string value)
        {
            Selecting?.Invoke(this, new ElementActionEventArgs(select, value));

            var nativeSelect = new SelectElement(WrappedElement);

            nativeSelect.SelectByText(value);
            WrappedElement     = null;
            ShouldCacheElement = false;
            Selected?.Invoke(this, new ElementActionEventArgs(select, value));
        }
Пример #5
0
        public void SelectByText(string value)
        {
            Selecting?.Invoke(this, new ElementActionEventArgs <IOSElement>(this, value));

            if (WrappedElement.Text != value)
            {
                WrappedElement.Click();
                var elementCreateService = ServicesCollection.Current.Resolve <ElementCreateService>();
                var innerElementToClick  = elementCreateService.CreateByValueContaining <RadioButton>(value);
                innerElementToClick.Click();
            }

            Selected?.Invoke(this, new ElementActionEventArgs <IOSElement>(this, value));
        }
Пример #6
0
        public virtual void SelectByText(string value)
        {
            Selecting?.Invoke(this, new ComponentActionEventArgs <OpenQA.Selenium.Appium.Android.AndroidElement>(this, value));

            if (WrappedElement.Text != value)
            {
                WrappedElement.Click();
                var elementCreateService = ServicesCollection.Current.Resolve <ComponentCreateService>();
                var innerElementToClick  = elementCreateService.CreateByTextContaining <RadioButton>(value);
                innerElementToClick.Click();
            }

            Selected?.Invoke(this, new ComponentActionEventArgs <OpenQA.Selenium.Appium.Android.AndroidElement>(this, value));
        }
 internal void OnSelecting(SelectingEventArgs args)
 {
     Selecting?.Invoke(this, args);
 }
Пример #8
0
 internal static void OnSelecting() => Selecting?.Invoke(null, EventArgs.Empty);