示例#1
0
 public override void  Perform()
 {
     for (int i = 0; i < numberOfHits; i++)
     {
         HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Tab);
     }
 }
示例#2
0
        public override void Perform()
        {
            SetupDataGridItemsSource();
            switch (KeyboardingIndex)
            {
            case 0:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Tab);
                break;

            case 1:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.LeftShift, Key.Tab);
                break;

            case 2:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.LeftCtrl, Key.Tab);
                break;

            case 3:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.LeftCtrl, Key.LeftShift, Key.Tab);
                break;

            case 4:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Up);
                break;

            case 5:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Down);
                break;

            case 6:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.PageUp);
                break;

            case 7:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.PageDown);
                break;

            case 8:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Left);
                break;

            case 9:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Right);
                break;

            case 10:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Home);
                break;

            case 11:
                HomelessTestHelpers.KeyPress(System.Windows.Input.Key.End);
                break;
            }
        }
示例#3
0
        public override void Perform()
        {
            Window.Content = Calendar;

            ClickOnNextButton(NumNextButtonClicks);
            ClickOnPreviousButton(NumPrevButtonClicks);

            // press right arrow key <x> times to select a random day on the Calendar
            for (int i = 0; i < NumLeftKeyPresses; i++)
            {
                HomelessTestHelpers.KeyPress(Key.Right);
            }
        }
示例#4
0
        public override void Perform()
        {
            Window.Content = DatePicker;

            // open the drop down
            DatePicker.IsDropDownOpen = true;

            // press right arrow key <x> times to select a random date on the Calendar
            for (int i = 0; i < NumLeftKeyPresses; i++)
            {
                HomelessTestHelpers.KeyPress(Key.Right);
            }

            // close the dropdown
            DatePicker.IsDropDownOpen = false;
        }
        public override void Perform()
        {
            if (IsKeyCombinationOkay(RandomKey, IsCtrl, IsAlt, IsShift))
            {
                List <Key> allKeys = new List <Key>();
                if (IsCtrl)
                {
                    allKeys.Add(Key.LeftCtrl);
                }
                if (IsAlt)
                {
                    allKeys.Add(Key.LeftAlt);
                }
                if (IsShift)
                {
                    allKeys.Add(Key.LeftShift);
                }
                allKeys.Add(RandomKey);

                HomelessTestHelpers.KeyPress(allKeys);
            }
        }
示例#6
0
 public override void Perform()
 {
     TreeViewTest.Focus();
     HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Multiply);
 }
示例#7
0
 public override void Perform()
 {
     HomelessTestHelpers.KeyPress(System.Windows.Input.Key.Space);
 }