-
-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
If you inspect https://www.asr.pima.gov/ using Chrome on Windows 11, you will see that the page has two forms.
But if you run the following code on Apache Netbeans 25 using JDK 24 and HtmlUnit 4.7.0, you will see that no forms are loaded:
package pima;
import org.htmlunit.*;
import org.htmlunit.html.*;
public class Pima {
public static void main(String[] args) {
try (final WebClient webClient = new WebClient(BrowserVersion.FIREFOX)) {
java.util.logging.Logger.getLogger("org.htmlunit").setLevel(java.util.logging.Level.OFF);
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
HtmlPage page = webClient.getPage("https://www.asr.pima.gov/");
webClient.waitForBackgroundJavaScriptStartingBefore(1_000_000);
page = (HtmlPage) page.getEnclosingWindow().getEnclosedPage();
System.out.println("page.asXml() = " + page.asXml());
}
catch (Exception e) {
System.out.println("Exception: " + e.toString());
}
}
}
The following does NOT fix the issue:
Adding the following line before "HtmlPage page ...":
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
Metadata
Metadata
Assignees
Labels
No labels