I have a shortcut with holding keys CRTL + ALT + E + CLICK on button.
In selenium I'm trying to do this with like below
var actions = new Actions(Driver)
then
actions.KeyDown(Keys.Control + Keys.Alt).SendKeys("E").Click(Button).Perform();
Method SendKeys("E")
is doing KeyDown
and then KeyUp
and that's why, I can not create correct shortcut with click because I'm not holding "E"
.
Any tips how to perform KeyDown("E")
?
EDIT:
actions.ClickAndHold(ActionButtons.Edit.Init());
actions.SendKeys(Keys.Control + Keys.Alt + "e" + Keys.Clear);
actions.Build().Perform();
Also I find other way with ClickAndHold(). The principle is click and send sequence of keys and in the same time release click. Any suggestions, how to do that ?