Hallo Marc, thanks for your help. I tried the new HtmlUnit jar and now it works. Thanks a lot!
Stefan Marc Guillemot wrote: > > Hi Stefan, > > I think that this has been fixed since HtmlUnit 1.11. You can try to get > the latest HtmlUnit build from http://build.canoo.com/htmlunit/artifacts/ > and to copy it in place of htmlunit-1.11.jar in WebTest's lib dir. > > Marc. > > > Stefan Seger wrote: >> >> Hello, >> >> I used an older version of webtest to test an application and haven't any >> problem with the login. But I needed the closeWindow step for further >> testing. So I downloaded the version 2.5. But when I run my test with >> this version the login fails with the message: >> >> null failed with message "JavaScript error loading page >> http://localhost:8090/xxx/welcome.do: Wrapped >> com.gargoylesoftware.htmlunit.ScriptException: TypeError: getJSPath is >> not a function, it is null. >> >> It seems that webtest has a problem with this code line: >> >> document.write("<script>function getJSPath() { return " + name + >> ";}</script>"); >> >> The JavaScript-code writes HTML which defines a JavaScript function. And >> this function can’t be found by another function in a different frame. >> >> The strange thing is, that it was no problem in the older webtest version >> (I think 2.1). >> >> Do you have any idea how we can solve this? >> > > -- View this message in context: http://www.nabble.com/JavaScript-error-by-document.write%28%22%3Cscript%3E...%3C-script%22%3E%29-tf4055509.html#a11538166 Sent from the WebTest mailing list archive at Nabble.com. _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest

