From: <Mik...@su...> - 2002-10-10 22:23:26
|
I have encountered a problem with the Javascript support in HtmlUnit 1.1pre5. I am recieving the following exception: com.gargoylesoftware.htmlunit.ScriptException: Cannot create property at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.getPageInfo(JavaScriptEngine.java:129) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:148) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:721) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeScriptTagsIfNeeded(HtmlPage.java:738) at com.gargoylesoftware.htmlunit.html.HtmlPage.<init>(HtmlPage.java:93) at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:45) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:330) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:227) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:169) at Test.main(Test.java:9) when executing the following code: import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.WebClient; public class Test { public static void main( String args[]) { try { WebClient webClient = new WebClient(); HtmlPage page = (HtmlPage)webClient.getPage( new java.net.URL(" http://localhost/test/bug.html")); } catch( Exception exception) { exception.printStackTrace(); } } } Attached is a tarball containing bug.html and the referenced Javascript file Common.js. (See attached file: htdocs.tar.gz) I am using: Windows 2000 SP2 IBM Java 1.3 HtmlUnit 1.1-pre5 Jakarta Commons HttpClient 2.0-alpha1 Jakarta Commonos Logging 1.0.1 Xerces 2.0.2 Mike |