Example #1
0
		public void KeyboardLeftRightUpDownArrow()
		{
			using (TreeApplication app = new TreeApplication("BindingSample"))
			{
				BindingTrees trees = new BindingTrees(app);
				trees.LeftTree.Element1.Select();
				Keyboard.Right();
				Keyboard.Down();
				trees.RightTree.Element1.Select();
				Keyboard.Right();
				Keyboard.Down();
				//Assert.IsFalse(trees.LeftTree.Element11.IsFocused, "Left Element11 has not focus after down"); //does not work, because asking for IsFocused sets focus?????
				Assert.IsTrue(trees.LeftTree.Element11.IsSelected, "Left Element11 selected after down");
				Assert.IsTrue(trees.RightTree.Element11.IsFocused, "Right Element11 has focus after down");
				Assert.IsTrue(trees.RightTree.Element11.IsSelected, "Right Element11 selected after down");
			}
		}
Example #2
0
 public void KeyboardLeftRightUpDownArrow()
 {
     using (TreeApplication app = new TreeApplication("BindingSample"))
     {
         BindingTrees trees = new BindingTrees(app);
         trees.LeftTree.Element1.Select();
         Keyboard.Right();
         Keyboard.Down();
         trees.RightTree.Element1.Select();
         Keyboard.Right();
         Keyboard.Down();
         //Assert.IsFalse(trees.LeftTree.Element11.IsFocused, "Left Element11 has not focus after down"); //does not work, because asking for IsFocused sets focus?????
         Assert.IsTrue(trees.LeftTree.Element11.IsSelected, "Left Element11 selected after down");
         Assert.IsTrue(trees.RightTree.Element11.IsFocused, "Right Element11 has focus after down");
         Assert.IsTrue(trees.RightTree.Element11.IsSelected, "Right Element11 selected after down");
     }
 }