For my Selenium testing in Java, I have encountered a challenge with a webpage script that calls window.close()
immediately after the page loads.
window.opener='whatever';
window.open('','_parent','');
window.close();
When using IE9, a confirm dialog pops up, saying "The webpage you are viewing is trying to close the window disable," with options for Yes and No. Clicking Yes will close the webpage.
To maintain the session and avoid this unwanted closing behavior and popup, I am seeking suggestions for overriding or ignoring the window.close()
script.
Thank you in advance!