How can I close alert message by enter action through keyboard?
emmalee last edited by
I'm looking for a different way to close an alert message other than
dismiss()methods. How can I close an alert message by entering action through the keyboard?
Alberto last edited by
Alert alert = new Alert(); alert.sendkeys(Keys.RETURN);
If that doesn't work you can use Enter key code and pass it to sendkeys, like this
alert.sendkeys(<<ENter key code>>);
Hope it helps.