I am trying send a shortcut with Actions.sendKeys, but it isn't working.
(New Actions(driver)).SendKeys(Keys.ALT, Keys.SHIFT, "z");
I am trying send a shortcut with Actions.sendKeys, but it isn't working.
(New Actions(driver)).SendKeys(Keys.ALT, Keys.SHIFT, "z");
Assuming you're using JavaScript,
Keys.chord(keys)
Also, the documentation is at https://www.selenium.dev/documentation/en/
Apart from the Keys.chord(Keys.ALT, Keys.SHIFT,"z"); method as suggested in the other/accepted answer, I would suggest you try the Robot framework for using keyboard shortcuts.
You can do something like;
Robot robot = new Robot();
Thread.sleep(1000);
robot.delay(3000);
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_Y);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyRelease(KeyEvent.VK_Y);
I guess this would help sort your problem.