I have met the problem just as milvia and Frank met in 2006.
http://groups.google.com/group/watij/browse_thread/thread/67992596f706095a/877acb252f098c95?lnk=gst&q=denied#877acb252f098c95
Is there anyone find some solution to resolve it or work around it?
Or is there any way to pause, stop or release the webBrowser besides
close it?
The page is like this:
<script language="JavaScript">
function onclickLaunch()
{
var remote = open('/include/blank.html', 'newpopup');
document.launchpopup.target =
remote.name;
document.launchpopup.action = "<a url>";
document.launchpopup.submit();
}
</script>
<form name="launchpopup">
<input type="button" id="launchBtn" name="launchBtn" value=" Launch "
onclick="javascript:onclickLaunch();"/>
</form>
The test case is:
import junit.framework.TestCase;
import
watij.runtime.ie.IE;
import static watij.finders.SymbolFactory.*;
public class SubmitFormToPopupTest extends TestCase{
public void test() throws Exception
{
IE ie = new IE();
ie.start("
http://localhost");
Thread.sleep(3000);
ie.button(id, "launchBtn").click();
}
}
It appears the java script code that submit the form to the popup
caused the error.