When opening https://en.js.cx/task/endless-page/solution/ htmlunit gets stuck, probably loading the endlessly scrolling page forever.
Its interesting the driver itself never times out, it just keeps going. Had waits set up after driver get but those were never reached.
driver = new HtmlUnitDriver(BrowserVersion.FIREFOX, true) {
@Override
protected WebClient modifyWebClient(WebClient client) {
final WebClient webClient = super.modifyWebClient(client);
WebClientOptions options = webClient.getOptions();
options.setCssEnabled(true);
options.setThrowExceptionOnScriptError(false);
webClient.setJavaScriptErrorListener(new SilentJavaScriptErrorListener());
return webClient;
}
}
driver.get("https://en.js.cx/task/endless-page/solution/");
My goal was to trigger the scroll via scroll into view, but never reached that phase.
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView();",driver.findElement(lastElement));
I wanted to set up a test case for scroll not working correctly and found this bug instead.
Assume its due to htmlunit not having a ui and triggering scroll on the page due to showing the last element.
Can open the page in Firefox fine.

When opening https://en.js.cx/task/endless-page/solution/ htmlunit gets stuck, probably loading the endlessly scrolling page forever.
Its interesting the driver itself never times out, it just keeps going. Had waits set up after driver get but those were never reached.
My goal was to trigger the scroll via scroll into view, but never reached that phase.
I wanted to set up a test case for scroll not working correctly and found this bug instead.
Assume its due to htmlunit not having a ui and triggering scroll on the page due to showing the last element.
Can open the page in Firefox fine.