Пример #1
0
        public override void Execute(ActivityContext context)
        {
            var e = context.GetElement(this.Element);

            e.Focus();

            context.Set(this.Value, e.Value);
        }
Пример #2
0
        public override void Execute(ActivityContext context)
        {
            var e = context.GetElement(this.Element);

            using (var input = new InputDriver())
            {
                e.Focus();
                e.Click();
            }
        }
Пример #3
0
        public override void Execute(ActivityContext context)
        {
            var e = context.GetElement(this.Element);

            var text = context.Get(this.Text, string.Empty);

            e.Focus();

            SendKeys.SendWait(text);
        }
Пример #4
0
        public override void Execute(ActivityContext context)
        {
            var value = context.Get(this.Value, string.Empty);

            var e = context.GetElement(this.Element);

            e.Focus();

            e.Value = value;
        }
Пример #5
0
        public override void Execute(ActivityContext context)
        {
            var e = context.GetElement(this.Element);

            using (var input = new InputDriver())
            {
                e.Focus();
                var p = e.Bounds.Center;
                input.MouseMove(p.X, p.Y);
                input.Click(MouseButton.Left);
            }
        }
Пример #6
0
        public override void Execute(ActivityContext context)
        {
            var e = context.GetElement(this.Element);

            var name = context.Get(this.PropertyName);

            if (e.GetType().GetProperty(name, BindingFlags.Public | BindingFlags.Instance) is PropertyInfo pi)
            {
                context.Set(this.PropertyValue, pi.GetValue(e)?.ToString() ?? string.Empty);
            }
            else
            {
                throw new Exception(string.Format("Element property '{0}' not found.", name));
            }
        }