Print pop-up cancel is not working

I am trying to click ‘Cancel’ button in Print Pop-up but Its not working for me. I tried with robot code and normal SwitchWindow code but nothing is working. Can someone please help me?

1 Like

use the below code

Robot r = new Robot();
r.keyPress(KeyEvent.VK_ESCAPE);
r.keyRelease(KeyEvent.VK_ESCAPE);

get the window handle index or count. then switch to the corresponding window. press esc or click cancel in window. switch back to parent window

Hi @sailakshmi.pernamitt,

Welcome to our community. Can you please help try the suggestion from @Monty_Bagati and let us know if it works/ not work? Thank you