press keyboard button without finding element selenium code example
Example: selenium press enter without element
try {
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
robot.delay(200);
}