Skip to content

Jquery document ready not working #275

@cdalexndr

Description

@cdalexndr

The following doesn't work:
page.executeJavaScript( "$(document).ready(function() { console.info('test'); });" );
But if I unwrap the jquery ready function, it works as expected:
page.executeJavaScript( "console.info('test');" );

After more testing it seems there is a race condition: reloading a page with external script (<script src=...) causes the loaded javascript to run the document ready code sometimes.

Jquery 3.5.1
HtmlUnit 2.45.0

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