Click() public method

public Click ( int hwnd ) : void
hwnd int
return void
Beispiel #1
0
        public void ButtonElementTest()
        {
            Button btn = new Button();
            int hbtn = btn.Find(mainHwnd, "Button", btnButtonButton, 0);
            btn.Click(hbtn);
            //Assert.AreEqual(false,btn.IsPressed(hbtn));

            hbtn = btn.Find(mainHwnd, "Button", btnCheckBoxButton, 0);
            btn.Click(hbtn);
            Assert.AreEqual(true, btn.IsPressed(hbtn));

            btn.Click(hbtn);
            Assert.AreEqual(false, btn.IsPressed(hbtn));
        }
Beispiel #2
0
        public void CheckBoxElementTest(
            [Values(rbUnchecked, rbChecked, rbIntermediate)] String input,
            [Values(false,true,null)] bool state)
        {
            Button btn = new Button();
            int hbtn = btn.Find(mainHwnd, "Button", cbCheckBox, 0);
            int hstate = btn.Find(mainHwnd, "Button", input, 0);

            btn.Click(hstate);

            if (state == null)
            {
                Assert.IsTrue(btn.IsIntermediate(hbtn));
            }
            else
            {
                Assert.AreEqual(state,btn.IsChecked(hbtn));
            }
        }