private void FormItems_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.N) { NewBtn.PerformClick(); } else if (e.Control && e.KeyCode == Keys.S) { SaveBtn.PerformClick(); } else if (e.Shift && e.KeyCode == Keys.Delete) { DeleteBtn.PerformClick(); } else if (e.Control && e.KeyCode == Keys.F) { SearchTxt.Focus(); } }
public void ClickNewBtn() { NewBtn.Click(); modalWindow = wait.Until(Driver => Driver.FindElement(By.XPath("//*[@class='modal-dialog']"))); }
private void Form1_Load_1(object sender, EventArgs e) { NewBtn.PerformClick(); }