[httpunit-javascript] javascript enabled browser
Alex <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
I need to be able to access a website and get its source code. But it
doesn't work because scripting is not really enabled
I get message (In order to use this application, you must have Java
Scripting enabled..). what am I doing wrong?
WebConversation wc = new WebConversation();
wc.setUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
WebRequest request = new GetMethodWebRequest(myURL);
HttpUnitOptions.setScriptingEnabled( true );
WebResponse response = wc.getResponse( request );