Menu

HTTPUnit and Bad Javascript

Help
2005-11-28
2013-04-26
  • Mark Micallef

    Mark Micallef - 2005-11-28

    Hi all,

      I am new to HTTPUnit but am very impressed so far.  My problem is concerned with HTTPUnit  throwing an exception when it tries to parse a web that has invalid javascript code in it. I know this is meant to be a good thing because HTTPUnit is meant to detect errors but is there a way of telling HTTPUnit to skip Javascript parsing all together?

    Mark

     
    • KevinDEX

      KevinDEX - 2005-11-29

      Yes,  call the static method

      HttpUnitOptions.setScriptingEnabled(false);

      Or, to simply turn of the throwing of exceptions (that way you can still run scripts, but not have it stop your test) call:

      HttpUnitOptions.setExceptionsThrownOnScriptError(false);

       

Log in to post a comment.

MongoDB Logo MongoDB