Example #1
0
 public void ClickOnWhiteSpaceToRightOfEntry_ThenKeyboardNavigate_CorrectEntrySelected()
 {
     ListViewTester l = new ListViewTester("_listView", _window);
     using (MouseController mc = new MouseController(l))
     {
         using (KeyboardController kc = new KeyboardController(l))
         {
             l.Select(0);
             Rectangle r = l.Properties.GetItemRect(1);
             mc.Click(r.Right + 1, r.Top + 1);
             kc.Press("{DOWN}");
             kc.Release("{DOWN}");
         }
     }
     Assert.AreEqual(2, l.Properties.SelectedIndices[0]);
 }
Example #2
0
        public void init()
        {
            verified = false;

            if (!SystemInformation.UserInteractive)
            {
                isUserInteractive.SetValue(null, true);
            }

            if (UseHidden)
            {
                testDesktop = new Desktop("NUnitForms Test Desktop", DisplayHidden);
            }

            modal    = new ModalFormTester();
            mouse    = new MouseController();
            keyboard = new KeyboardController(new OldSendKeysFactory());

            Setup();
        }
Example #3
0
	public void init()
	{
	  verified = false;
	  if (!SystemInformation.UserInteractive)
	  {
		  if (isUserInteractive != null) // is named something else on Mono
		  {
			  isUserInteractive.SetValue(null, true);
		  }
	  }

	  if (UseHidden)
	  {
		testDesktop = new Desktop("NUnitForms Test Desktop", DisplayHidden);
	  }

	  modal = new ModalFormTester();

	  BaseSetup();

	  mouse = new MouseController();
	  keyboard = new KeyboardController();

	  if (CurrentForm != null)
	  {
		currentForm.Show();
	  }
	  Setup();
	}
Example #4
0
 /// <summary>
 /// A patch method to allow migration to an alternative SendKeys class instead
 /// of the dot Net SendKeys class. Once the new class is completed this method
 /// will be replaced by a method to allow use of the dot Net class.
 ///
 /// This method must only be called at the start of the test fixture's overriden
 /// SetUp().
 /// </summary>
 protected void EmulateWindowSpecificSendKeys()
 {
     keyboard =
         new KeyboardController(
             new SendKeysFactory(new SendKeysParserFactory(), new WindowSpecificSendKeyboardInput()));
 }
Example #5
0
		private static void PressCtrlN(ControlTester t)
		{
			using (KeyboardController kc = new KeyboardController(t))
			{
				kc.Press("^n"); // Ctrl+N
			}
		}