Menu

undefined is not a function. HELP!!

suresh vv
2002-09-05
2002-09-09
  • suresh vv

    suresh vv - 2002-09-05

    I get the following exception:

    There was 1 error:
    1) testSubmitViaScript(com.meterware.httpunit.javascript.RPTest1)java.lang.RuntimeException: TypeError: undefined is not a function. (httpunit; line 198) at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptEngineFactory.java:47)

    Anybody knows what causes this?

     
    • Russell Gold

      Russell Gold - 2002-09-05

      You are probably using a JavaScript function that HttpUnit does not recognize. This error message comes from Rhino. I haven't figure out how to make it a more useful message yet.

       
      • suresh vv

        suresh vv - 2002-09-09

        Did some more research on this and found that Rhino fails on the following line:

        document.writeln(HTMLstr);

        I tried to replace writeln with write and the argument with an empty string and same thing happens.
        Same error happens when I do:

        document.focus()

        However i am able to do

        alert(document.title)

        Any ideas?

        TIA,

        suresh

         
    • suresh vv

      suresh vv - 2002-09-09

      Russ,

      Thanks for the feedback. Any tips on how I can identify this function and rewrite it so httpunit doesn't choke?

      Suresh

       

Log in to post a comment.

Auth0 Logo