When an IE window is launched from Watij, it is impossible to do a document.write on popup windows. IE gives an "Access is denied" JS error.
If you disconnect Watij from IE by killing Watij's java process, the same document.write will work.
To reproduce:
IE ie = new IE();
ie.start("http://localhost:9080/edm/test.html");
With test.html being the following HTML (Also attached) .
<html>
<head>
<script>
function popup(){
var popup = window.open("", "" ,"resizable=yes,status=yes,top=10,width=200,left=10,height=200");
popup.document.write("<html><body>Popup</body></html>");
popup.document.close();
}
</script>
</head>
<body onload="popup()">
Parent Window
</body>
</html>
Test html file