You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for giving HtmlUnit at try.
The 'Javascript execution takes too long' is a stupid bug a made in version 4.18.0 - you can use 4.17.0 or the latest snapshot build of 4.19.0 instead.
Another option is simply remove the line webClient.setJavaScriptTimeout(10_0000); from your code.
Regarding the Script syntax error i have to check. This is usually based of some missing feature in rhino. But Rhino moves fast these days... will have a look and come back to you later.
Have added a simple test for loading bootstrap.bundle.js. This fails because of some missing spread operator suppot. There is already a PR in rhino for this. Hopefully i can merge this soon.
I got a similar issue when upgrading Bootstrap from v4 to v5.
My project is a Jakarta EE Faces project that uses Arquillian Drone to test web pages. I configured the Arquillian Drone to use Selenium HtmlUnit as the background webdriver.
Yes this is still a bug with HtmlUnit. We did many improvements over the last months in the js support area. The problem mentioned here is fixed (the ... operator in parameters) but there are still more. In this case it is the missing class support. There is some hope to have this during the next months but it is in really early stage. You can monitor this issue, will report here if some solution is available.
Activity
rbri commentedon Nov 17, 2025
Hi @kentyeh,
thanks for giving HtmlUnit at try.
The 'Javascript execution takes too long' is a stupid bug a made in version 4.18.0 - you can use 4.17.0 or the latest snapshot build of 4.19.0 instead.
Another option is simply remove the line webClient.setJavaScriptTimeout(10_0000); from your code.
Regarding the Script syntax error i have to check. This is usually based of some missing feature in rhino. But Rhino moves fast these days... will have a look and come back to you later.
kentyeh commentedon Nov 18, 2025
My test was failing due to an issue with the
webClient.setJavaScriptTimeoutmethod. It's working now, thank you for your help!rbri commentedon Nov 18, 2025
@kentyeh great and thanks for the feedback. Will let this open for some time to remind me of adding some unit tests for bootstrap
rbri commentedon Dec 23, 2025
Have added a simple test for loading bootstrap.bundle.js. This fails because of some missing spread operator suppot. There is already a PR in rhino for this. Hopefully i can merge this soon.
kentyeh commentedon Jan 2, 2026
I'm running another Bootstrap test.
Everything works as expected when running via
However, while index.jsp loads correctly, index2.jsp fails.
Is this due to the same root cause as before, or is it a previously undiscovered bug?"
HtmlRunner2.zip
hantsy commentedon Mar 20, 2026
I got a similar issue when upgrading Bootstrap from v4 to v5.
My project is a Jakarta EE Faces project that uses Arquillian Drone to test web pages. I configured the Arquillian Drone to use Selenium HtmlUnit as the background webdriver.
https://github.com/hantsy/jakartaee-faces-sample/blob/master/src/test/java/com/example/it/HomeScreenTest.java
I filed an issue on SeleniumHQ GitHub issues before, SeleniumHQ/selenium#17150
rbri commentedon Mar 21, 2026
Yes this is still a bug with HtmlUnit. We did many improvements over the last months in the js support area. The problem mentioned here is fixed (the ... operator in parameters) but there are still more. In this case it is the missing class support. There is some hope to have this during the next months but it is in really early stage. You can monitor this issue, will report here if some solution is available.
Outside of this, you can try to use something like babel to transpile the js file to a rhino compatible version and then use a ScriptPreProcessor to replace the file on the fly.
see https://www.htmlunit.org/faq.html#HowToModifyJavascriptCode and https://github.com/HtmlUnit/htmlunit/blob/master/src/main/java/org/htmlunit/javascript/preprocessor/HtmxTwoZeroSevenScriptPreProcessor.java for some more info