예제 #1
0
파일: ui.cs 프로젝트: dotnet/wpf-test
        override internal void Execute(ILog log, IntPtr top)
        {
            AutomationElement target = TargetResolver.Resolve(log, top, TargetID);

            Utils.MoveTo(target);
            LogExecution(log, ID, TargetID);
        }
예제 #2
0
파일: ui.cs 프로젝트: dotnet/wpf-test
        override internal void Execute(ILog log, IntPtr top)
        {
            AutomationElement target = TargetResolver.Resolve(log, top, TargetID);

            Utils.ResizeWindow(target, factor);
            LogExecution(log, ID, TargetID);
        }
예제 #3
0
파일: ui.cs 프로젝트: dotnet/wpf-test
        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);
        }
예제 #4
0
파일: ui.cs 프로젝트: dotnet/wpf-test
        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);
        }
예제 #5
0
파일: ui.cs 프로젝트: dotnet/wpf-test
        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);
        }