HtmlUnit忽略JavaScript错误?

我试图通过一个网站,但在他的一个页面上,我得到这个错误
EcmaError: lineNumber=[671] column=[0] linesource=[null] name=[TypeError] sourceName=[https://reservations.besodelsolresort.com/asp/CalendarPopup.js] message=[TypeError: Cannot read property "parentNode" from undefined (https://reservations.besodelsolresort.com/asp/CalendarPopup.js#671)]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "parentNode" from undefined (https://reservations.besodelsolresort.com/asp/CalendarPopup.js#671)

有没有反正我可以忽略这个错误?我不是特别关心日历是否正确加载.

解决方法

Alexey的答案是针对HttpUnit.对于HtmlUnit,代码是类似的
WebClient client = new WebClient();
client.getoptions().setThrowExceptionOnScriptError(false);

相关文章

Mip是什么意思以及作用有哪些
怎么测试Mip页面运行情况
MIP安装的具体步骤有哪些
HTML添加超链接、锚点的方法及作用详解(附视频)
MIP的规则有哪些
Mip轮播图组件中的重要属性讲解