예제 #1
0
        public void SendsInputToTargetWindowWithoutChangingFocus()
        {
            var focusWindow = new TestWindowAdapter(TimeoutMillis);

            focusWindow.Show();
            focusWindow.Focus();
            Assert.IsFalse(_window.HasFocus, "The target window has focus.");

            _driver.Write("a");

            WindowShouldHaveReceivedKeyPressSequence('a');
            Assert.IsFalse(_window.HasFocus, "The target window gained focus.");
        }
        public void SendsInputToTargetWindowWithoutChangingFocus()
        {
            var focusWindow = new TestWindowAdapter(TimeoutMillis);

            focusWindow.Show();
            focusWindow.Focus();
            Assert.IsFalse(_window.HasFocus, "The target window has focus.");

            _driver.Write("a");

            WindowShouldHaveReceivedKeyPressSequence('a');
            Assert.IsFalse(_window.HasFocus, "The target window gained focus.");
        }
예제 #3
0
 public void SetUp()
 {
     _window = new TestWindowAdapter(TimeoutMillis);
     _window.Show();
     _driver = new KeyboardDriver(WindowsMessagingKeyboard(), new KeyCodeMapper());
 }
 public void SetUp()
 {
     _window = new TestWindowAdapter(TimeoutMillis);
     _window.Show();
     _driver = new KeyboardDriver(WindowsMessagingKeyboard(), new KeyCodeMapper());
 }