Skip to content

Thread interactions and ajax when running with Selenium? #258

@skyhirider

Description

@skyhirider

How is HtmlUnit handling the threads when it is run via the driver?

I have been running it on an ajax heavy website according to the faq on your website (niceleysync ajax controller and waitForJs set to 150000) yes some aspects are still not working as expected.

I am now wondering if the main thread goes to sleep after a certain amount of time and does not respond to any followup ajax commands from the server.

Specifically, the parts where I either receive an attachment response in up to a minute after a page loads or a popup window are not working as expected. I am using Selenium waits.

I also seem to have issues when dispatching a click event (var event = new Event(click) and (element.dispatchEvent(event) via javascript.

The code above works perfectly in Firefox when ran in the console, but does not trigger when ran via the js executor in selenium.

Is there a way or a configuration option for the main thread to keep taking in the those requests? Or does it actually do so already?

And the attachment handling you implemented is perfect, sorry for not commenting on the issue earlier. It really makes downloading attachments a breeze!

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