public void NumberBoxDisplayChangingPageTest()
        {
            using (var setup = new TestSetupHelper("Pager Tests"))
            {
                elements = new PagerTestsPageElements();

                SetNumberBoxDisplayMode();
                VerifyNumberBoxDisplayMode();
                VerifyPageChangedEventOutput(0);

                SendValueToNumberBox("3"); // Note: Pager displays numbers starting at 1 but the page changed event sends 0-based numbers
                VerifyPageChangedEventOutput(2);

                SendValueToNumberBox("1");
                VerifyPageChangedEventOutput(0);

                SendValueToNumberBox("5");
                VerifyPageChangedEventOutput(4);

                SendValueToNumberBox("2");
                VerifyPageChangedEventOutput(1);

                SendValueToNumberBox("100");
                Verify.AreEqual("5", FindTextBox(elements.GetPagerNumberBox()).GetText()); // If over max, value should be clamped down to the max.
                VerifyPageChangedEventOutput(4);

                SendValueToNumberBox("-100");
                Verify.AreEqual("1", FindTextBox(elements.GetPagerNumberBox()).GetText()); // If under min, value should be clamped up to the min.
                VerifyPageChangedEventOutput(0);
            }
        }
        void SendValueToNumberBox(string value)
        {
            Edit textbox = FindTextBox(elements.GetPagerNumberBox());

            Verify.IsNotNull(textbox);

            KeyboardHelper.EnterText(textbox, value);
            KeyboardHelper.PressKey(Key.Enter);
            Wait.ForIdle();
        }