MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / getFormElements

Method getFormElements

src/main/java/org/htmlunit/html/HtmlForm.java:561–572  ·  view source on GitHub ↗

@return A List containing all form controls in the form. The form controls in the returned collection are in the same order in which they appear in the form by following a preorder, depth-first traversal of the tree. This is called tree order. Only the following eleme

()

Source from the content-addressed store, hash-verified

559 * button, fieldset, input, object, output, select, textarea.
560 */
561 public List<HtmlElement> getFormElements() {
562 return getElements(htmlElement -> {
563 final String tagName = htmlElement.getTagName();
564 return HtmlButton.TAG_NAME.equals(tagName)
565 || HtmlFieldSet.TAG_NAME.equals(tagName)
566 || HtmlInput.TAG_NAME.equals(tagName)
567 || HtmlObject.TAG_NAME.equals(tagName)
568 || HtmlOutput.TAG_NAME.equals(tagName)
569 || HtmlSelect.TAG_NAME.equals(tagName)
570 || HtmlTextArea.TAG_NAME.equals(tagName);
571 });
572 }
573
574 /**
575 * This is the backend for the getElements() javascript function of the form.

Callers 1

isValidMethod · 0.95

Calls 3

getElementsMethod · 0.95
getTagNameMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected