override internal void Execute(ILog log, IntPtr top) { AutomationElement target = TargetResolver.Resolve(log, top, TargetID); Utils.MoveTo(target); LogExecution(log, ID, TargetID); }
override internal void Execute(ILog log, IntPtr top) { AutomationElement target = TargetResolver.Resolve(log, top, TargetID); Utils.ResizeWindow(target, factor); LogExecution(log, ID, TargetID); }
override internal void Execute(ILog log, IntPtr top) { AutomationElement target = TargetResolver.Resolve(log, top, TargetID); Point p = target.GetClickablePoint(); MTI.Input.SendMouseInput(p.X, p.Y, 0, MTI.SendMouseInputFlags.Absolute | MTI.SendMouseInputFlags.LeftDown | MTI.SendMouseInputFlags.Move); MTI.Input.SendMouseInput(p.X, p.Y, 0, MTI.SendMouseInputFlags.Absolute | MTI.SendMouseInputFlags.LeftUp | MTI.SendMouseInputFlags.Move); LogExecution(log, ID, TargetID); }
override internal void Execute(ILog log, IntPtr top) { AutomationElement target = TargetResolver.Resolve(log, top, TargetID); // set the focus in the element target.SetFocus(); // wait until the element is focused Thread.Sleep(100); // write text (was 300ms but that's just too slow) MTI.Input.SendUnicodeString(text, 1, 200); // log the action LogExecution(log, ID, TargetID); }
override internal void Execute(ILog log, IntPtr top) { if (TargetID != null) { // get the target's automation element AutomationElement target = TargetResolver.Resolve(log, top, TargetID); // set the focus in the element target.SetFocus(); } // wait until the element is focused Thread.Sleep(100); // press key Key key = (Key)Enum.Parse(typeof(Key), keyDescription); MTI.Input.SendKeyboardInput(key, true); // log the execution LogExecution(log, ID, TargetID); }