i am getting error while execution the script in headless mode. While headless execution is going on , my escape key is not working , i am trying to press the escape key using the Robot class. In normal browser execution , it is working well but in case of headless execution it is not working.
The Robot class can only interact with a visible window opened on desktop. A headless browser does not open any visible window. So I think that Robot can not interact with headless browser.
Why not you try send ESC key using WebUI.sendKeys()? Possibly it would work with headless browser.
Yes @kazurayam.I tried the WebUI.sendkeys and it worked in headless execution. Thank you for providing solution.