webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setAppletEnabled(true);
webClient.setPrintHandler(new MyPrintHandler());
webClient.waitForBackgroundJavaScript(5000);
webClient.waitForBackgroundJavaScriptStartingBefore(5000);
// this line throw exception
page1.executeJavaScript("html2canvas(document.body).then(function(canvas) {\n" +
"\n" +
"console.log(2222)\n" +
"\n" +
"});");
[WARN ] 2023-06-05 17:28:56,893 method:org.htmlunit.javascript.host.html.HTMLDocument.close(HTMLDocument.java:518)
close() called when document is not open.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too