Skip to content

Endless loop when opening this url? #942

Description

@skyhirider

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.

Image

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions