Skip to content

TypeError: Cannot modify readonly property: constructor #537

@basimons

Description

@basimons

I have been using htmlUnit on this specific website for a while to test our SAML login flow. A few days ago the test suddenly broke, without any changes from our end. Something probably changed on the website, but it is not working anymore. I was using 2.65.0 and updated to 2.67.0 to see if it fixed it, but unfortunately doesn't seem to do the trick.

A minimally reproducable example:

WebClient webClient = new WebClient(BrowserVersion.BEST_SUPPORTED);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setJavaScriptEnabled(true);

webClient.getPage("https://dev-43246762.okta.com/home/dev-43246762_blockbaxtest_1/0oa1a0d285rc8xFaS5d7/aln1a0gob9YTeiQMJ5d7");
webClient.waitForBackgroundJavaScript(10000);
HtmlPage okta = (HtmlPage) webClient.getCurrentWindow().getEnclosedPage();
webClient.waitForBackgroundJavaScript(10000);

Hope this is helpful, if not feel free to ask for more information.

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