I am using Selenium on Java to auto test a webpage, this page's script calls window.close() right after page is loaded.
window.opener='whatever';
window.open('','_parent','');
window.close();
In IE9, it pops up a confirm dialog "The webpage you are viewing is trying to close the window disable" with Yes/No options. Pressing Yes will close the webpage.
I don't want this closing (to keep the session) and neither the popup. Could you please suggest me a solution for ignore or override the window.close() script.
Thanks in advance.