Skip to content

Commit

Permalink
fix for form processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 3, 2023
1 parent 3ce40a9 commit b0b24d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/htmlunit/html/HtmlForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ private <E extends HtmlElement> List<E> getFormElementsByAttribute(
public List<HtmlElement> getElements() {
final List<HtmlElement> elements = new ArrayList<>();

for (final HtmlElement element : ((HtmlPage) getPage()).getBody().getHtmlElementDescendants()) {
for (final HtmlElement element : getPage().getDocumentElement().getHtmlElementDescendants()) {
if (SUBMITTABLE_ELEMENT_NAMES.contains(element.getTagName())
&& element.getEnclosingForm() == this) {
elements.add(element);
Expand Down

0 comments on commit b0b24d6

Please sign in to comment.