Edit: The possible duplicates mentioned deals with how to pass credentials and login for Authentication pop ups. My questions here is how to Cancel the Authentication popup. Is it achievable trough Robot class? /Edit
I want to Cancel the below Authentication pop up. I tried using Robot class, but not able to Cancel the pop.
Also the code is working, i.e. I am not getting any error.
Robot rb = new Robot();
rb.keyPress(KeyEvent.VK_TAB);
rb.keyRelease(KeyEvent.VK_TAB);
Thread.sleep(2000);
rb.keyPress(KeyEvent.VK_TAB);
rb.keyRelease(KeyEvent.VK_TAB);