关闭HttpUnit不支持的JavaScript语句,并查看错误
关闭不支持的JavaScript,并查看错误
HttpUnitOptions.setExceptionsThrownOnScriptError( false );
HttpUnitOptions.getScriptErrorMessages();
How do I handle a page that uses JavaScript features that HttpUnit does not support?
If you call HttpUnitOptions.setExceptionsThrownOnScriptError( false ); problems will be recorded but will not throw exceptions. You can see the list of problems detected by calling HttpUnitOptions.getScriptErrorMessages();