From: Thomas P. <pi...@pd...> - 2005-07-07 07:39:52
|
Hi, could anybody give me an example, how can I invoke a Javascript-Function with Htmlunit? Perhaps like this: <script type="text/javascript"> function FunctionXYZ () { ... } </script> final WebClient webClient = new WebClient(); final URL url = new URL( "http://y.x.z/test.html" ); final HtmlPage page1 = ( HtmlPage ) webClient.getPage( url ); final ScriptResult result = page1.executeJavaScriptFunctionIfPossible( ?FunctionXYZ?, ???, this, null, null ); I don't know, which parameters are required. Thanks, Thomas |