public void PressSpecialKey(KeyboardInput.SpecialKeys kSpecialKey) { Thread.Sleep(CommonData.iMinWait); wVStoreMainWindow.Keyboard.PressSpecialKey(kSpecialKey); Thread.Sleep(CommonData.iMinWait); wVStoreMainWindow.WaitWhileBusy(); }
protected virtual void AddUsedKey(KeyboardInput.SpecialKeys key) { if (heldKeys.Contains(key)) { return; } heldKeys.Add(key); }
protected virtual void RemoveUsedKey(KeyboardInput.SpecialKeys key) { if (!heldKeys.Contains(key)) { return; } heldKeys.Remove(key); }
public void WhenIPressTheKeyInRowOfThatGrid(KeyboardInput.SpecialKeys key, int rowNumber) { var row = GetRowFromIndex(rowNumber); row.Select(); row.KeyIn(key); }
public static void HotKey(KeyboardInput.SpecialKeys key1, KeyboardInput.SpecialKeys key2) { Console.WriteLine("Press Hotkey:" + key1.ToString() + "+" + key2.ToString()); Keyboard.Instance.HoldKey(key1); Thread.Sleep(1000); Keyboard.Instance.PressSpecialKey(key2); Thread.Sleep(1000); Keyboard.Instance.LeaveAllKeys(); Thread.Sleep(1000); }
public void ArrowsTest( IList <string> textToInsert, string marker, int strToClick, int chrToClick, string expectedText, KeyboardInput.SpecialKeys arrow) { var textEditBox = MainWindow.TextEditBoxForm; EnterAndClick(textEditBox, textToInsert, strToClick, chrToClick); textEditBox.PressKey(arrow); textEditBox.EnterOneLineText(marker); Assert.AreEqual(expectedText, textEditBox.Text); }
public void ArrowsAfterSelectTest( KeyboardInput.SpecialKeys arrow) { var textToInsert = BaseTestObjects.TextToInsertSelectedTests; var(startStr, startChr, endStr, endChr) = BaseTestObjects.BoundsSelectedTests.FirstOrDefault(); var textEditBox = MainWindow.TextEditBoxForm; EnterAndSelect(textEditBox, textToInsert, startStr, startChr, endStr, endChr); textEditBox.Click(); textEditBox.RightClick(); var contextMenu = MainWindow.ContextMenuForm; contextMenu.Copy(); Assert.IsEmpty(ClipboardHelper.GetText(string.Empty)); }
/// <summary> /// Implements <see cref="IKeyboardWithActionListener.LeaveKey(KeyboardInput.SpecialKeys, IActionListener)"/> /// </summary> public virtual void LeaveKey(KeyboardInput.SpecialKeys key, IActionListener actionListener) { SendKeyUp((short)key, true); RemoveUsedKey(key); actionListener.ActionPerformed(Action.WindowMessage); }
protected virtual void Send(KeyboardInput.SpecialKeys key, bool specialKey) { Press((short)key, specialKey); }
/// <summary> /// Implements <see cref="IUIItem.KeyIn"/> /// </summary> public virtual void KeyIn(KeyboardInput.SpecialKeys key) { actionListener.ActionPerforming(this); keyboard.PressSpecialKey(key, actionListener); }
/// <summary> /// Implements <see cref="IKeyboardWithActionListener.HoldKey(KeyboardInput.SpecialKeys, IActionListener)"/> /// </summary> public virtual void HoldKey(KeyboardInput.SpecialKeys key, IActionListener actionListener) { SendKeyDown((short)key, true); AddUsedKey(key); actionListener.ActionPerformed(Action.WindowMessage); }
public void PressKey(KeyboardInput.SpecialKeys @return) { ParentScreen.WhiteWindow.Keyboard.PressSpecialKey(@return); }
public virtual void LeaveKey(KeyboardInput.SpecialKeys key) { container.Focus(); keyboard.LeaveKey(key, container); }
/// <summary> /// Implements <see cref="IKeyboard.PressSpecialKey(KeyboardInput.SpecialKeys)"/> /// </summary> public virtual void PressSpecialKey(KeyboardInput.SpecialKeys key) { PressSpecialKey(key, new NullActionListener()); }
internal virtual void HoldKey(KeyboardInput.SpecialKeys key) { SendKeyDown((short)key, true); heldKeys.Add(key); }
public static void PressSpecialKey(this AttachedKeyboard keyboard, KeyboardInput.SpecialKeys holdKey, KeyboardInput.SpecialKeys specialKey) { keyboard.HoldKey(holdKey); keyboard.PressSpecialKey(specialKey); keyboard.LeaveKey(holdKey); }
public IIntoAction Key(KeyboardInput.SpecialKeys key) { var action = new Action <IUIItem>(i => i.KeyIn(key)); return(_fixture.Data.Locate <IIntoAction>(constraints: new { _Values = new object[] { _fixture, action } })); }
private void Send(KeyboardInput.SpecialKeys key, bool specialKey) { Press((short)key, specialKey); }
internal virtual void HoldKey(KeyboardInput.SpecialKeys key, ActionListener actionListener) { SendKeyDown((short)key, true); heldKeys.Add(key); actionListener.ActionPerformed(Action.WindowMessage); }
public IIntoAction Key(KeyboardInput.SpecialKeys key) { Initialize(); return(_data.Locate <IKeyInAction>(constraints: GetConstrainObject()).Key(key)); }
public keyinfo(KeyboardInput.SpecialKeys specialKey) { isSpecialKey = true; this.specialKey = specialKey; }
public virtual void LeaveKey(KeyboardInput.SpecialKeys key) { SendKeyUp((short)key, true); heldKeys.Remove(key); }
public void PressKey(KeyboardInput.SpecialKeys specialKeys) { TestLogger.Instance.Info($"Key '{specialKeys}' in '{_name}'"); _source.KeyIn(specialKeys); }
public void KeyIn(KeyboardInput.SpecialKeys key) { LoggerUtil.Info($"Sending key to — {ItemName}. Key for enter — {key}"); UiItem.KeyIn(key); }
/// <summary> /// Implements <see cref="IKeyboardWithActionListener.PressSpecialKey(KeyboardInput.SpecialKeys, IActionListener)"/> /// </summary> public virtual void PressSpecialKey(KeyboardInput.SpecialKeys key, IActionListener actionListener) { Send(key, true); actionListener.ActionPerformed(Action.WindowMessage); }
public virtual void PressSpecialKey(KeyboardInput.SpecialKeys key) { Send(key, true); }