[Webtest] JavaScript error by document.write("<script>...</script">)

Stefan Seger Stefan Seger <Stefan.Seger@ids-scheer.com>
Tue, 10 Jul 2007 05:24:13 -0700 (PDT)


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:=20

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=E2=80=99t be found by another function in a different fra=
me.

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?
--=20
View this message in context: http://www.nabble.com/JavaScript-error-by-doc=
ument.write%28%22%3Cscript%3E...%3C-script%22%3E%29-tf4055509.html#a1151978=
7
Sent from the WebTest mailing list archive at Nabble.com.