public void Click_WithShiftPressedInList_SelectsItems() { // Explorer open full screen on the left monitor MouseEx.Move(Position.Point(new Point(-1300, 210))); MouseEx.Click().And.Wait(500); MouseEx.Move(Position.Point(new Point(-1300, 310))); MouseEx.Click(ModifierKeys.Shift).And.Wait(500); }
public void Click_WithControlPressedInListButThenAnymore_SelectsItems() { // Explorer open full screen on the left monitor MouseEx.Move(Position.Point(new Point(-1300, 210))); MouseEx.Click().And.Wait(500); MouseEx.Move(Position.Point(new Point(-1300, 250))); MouseEx.Click(ModifierKeys.Control).And.Wait(500); MouseEx.Move(Position.Point(new Point(-1300, 290))); MouseEx.Click(ModifierKeys.Control).And.Wait(500); MouseEx.Move(Position.Point(new Point(-1300, 310))); MouseEx.Click().And.Wait(500); }
public void BringOnTop_TypesTextToDifferentWindows_TheWindowsGetsTheTextAccordingly() { var window1 = WindowFinder.Search(Use.AutomationId("CUI_WindowFocusTestsWindow_1")); var window2 = WindowFinder.Search(Use.AutomationId("CUI_WindowFocusTestsWindow_2")); var textBox1 = UI.GetChild <BasicEdit>(By.AutomationId("CUI_InputTextBox"), From.Element(window1)); var textBox2 = UI.GetChild <BasicEdit>(By.AutomationId("CUI_InputTextBox"), From.Element(window2)); WindowFocus.BringOnTop(window1); MouseEx.Click(window1); KeyboardEx.TypeText("First Window Text").And.Wait(1000); WindowFocus.BringOnTop(window2); MouseEx.Click(window2); KeyboardEx.TypeText("Second Window Text").And.Wait(1000); Assert.AreEqual("First Window Text", textBox1.Text); Assert.AreEqual("Second Window Text", textBox2.Text); }
public void Click_ChangeStatusBarVisibilityTwoTimes_DoesItAccordingly() { var statusBar = UI.GetChild(By.AutomationId("CUI_StatusBar"), From.Element(_testWindow)); Assert.IsTrue(statusBar.IsVisible); var viewMenuItem = UI.GetChild(By.AutomationId("CUI_ViewMenuItem"), From.Element(_testWindow)); MouseEx.Click(viewMenuItem).And.Wait(1000); var statusleisteMenuItem = UI.GetChild(By.AutomationId("CUI_ToggleStatusbarMenuItem"), From.Element(_testWindow)); MouseEx.Click(statusleisteMenuItem).And.Wait(1000); Assert.IsFalse(statusBar.IsVisible); MouseEx.Click(viewMenuItem).And.Wait(1000); statusleisteMenuItem = UI.GetChild(By.AutomationId("CUI_ToggleStatusbarMenuItem"), From.Element(_testWindow)); MouseEx.Click(statusleisteMenuItem).And.Wait(1000); Assert.IsTrue(statusBar.IsVisible); }