# Uses of Class
org.htmlunit.html.HtmlForm

Packages that use HtmlForm
Package
Description
com.xceptance.xlt.api.actions
Provides abstract super classes for different types of actions.
com.xceptance.xlt.api.util
Provides various utility classes to make writing test cases easier.
org.htmlunit.html
Classes specific to HTML pages, particularly the `HtmlPage` which represents an HTML document and provides access to its content.

- ## Uses of HtmlForm in com.xceptance.xlt.api.actions

  Methods in com.xceptance.xlt.api.actions with parameters of type HtmlForm
  Modifier and Type
  Method
  Description
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormClick(HtmlForm form, String elementToClick)`
  Loads the page by "clicking" the passed HTML element in the specified HTML form element.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormClick(HtmlForm form, String elementToClick, boolean randomPosition)`
  Deprecated.
  As of XLT 4.9.0, use `AbstractHtmlPageAction.loadPageByFormClick(HtmlForm, String)` instead.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormClick(HtmlForm form, String elementToClick, boolean randomPosition, long waitingTime)`
  Deprecated.
  As of XLT 4.9.0, use `AbstractHtmlPageAction.loadPageByFormClick(HtmlForm, String, long)` instead.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormClick(HtmlForm form, String elementToClick, long waitingTime)`
  Loads the page by "clicking" the passed HTML element in the specified HTML form element.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormSubmit(HtmlForm form)`
  Loads the page by submitting the given form.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormSubmit(HtmlForm form, long waitingTime)`
  Loads the page by submitting the given form.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormSubmit(HtmlForm form, SubmittableElement element)`
  Loads the page by submitting the given form.
  `protected void`
  AbstractHtmlPageAction.`loadPageByFormSubmit(HtmlForm form, SubmittableElement element, long waitingTime)`
  Loads the page by submitting the given form.

- ## Uses of HtmlForm in com.xceptance.xlt.api.util

  Methods in com.xceptance.xlt.api.util that return types with arguments of type HtmlForm
  Modifier and Type
  Method
  Description
  `static List<HtmlForm>`
  HtmlPageUtils.`getFormsByIDRegExp(HtmlPage page, Pattern pattern)`
  Returns a list of forms the ID of which matches the given regular expression.
  `static List<HtmlForm>`
  HtmlPageUtils.`getFormsByNameRegExp(HtmlPage page, Pattern pattern)`
  Returns a list of forms the name of which matches the given regular expression.
  Methods in com.xceptance.xlt.api.util with parameters of type HtmlForm
  Modifier and Type
  Method
  Description
  `static void`
  HtmlPageUtils.`checkRadioButton(HtmlForm form, String radioButtonName, int index)`
  Checks the HTML radio button input element with the given name and index in the specified form.
  `static void`
  HtmlPageUtils.`checkRadioButton(HtmlForm form, String radioButtonName, String value)`
  Checks the HTML radio button input element with the given name and value in the specified form.
  `static void`
  HtmlPageUtils.`checkRadioButtonRandomly(HtmlForm form, String radioButtonName)`
  Checks one of the radio buttons with the given name in the specified form.
  `static void`
  HtmlPageUtils.`checkRadioButtonRandomly(HtmlForm form, String radioButtonName, boolean excludeFirst, boolean excludeLast)`
  Checks one of the radio buttons with the given name in the specified form.
  `static HtmlInput`
  HtmlPageUtils.`createInput(HtmlForm form, String type, String name, String value)`
  Creates a new input HTML element, initializes it with the specified type, name, and value, and inserts it to the given form.
  `static <T extends HtmlInput>
  T`
  HtmlPageUtils.`getInputEndingWith(HtmlForm form, String suffix)`
  Returns the first input element that ends with this suffix.
  `static <T extends HtmlInput>
  T`
  HtmlPageUtils.`getInputStartingWith(HtmlForm form, String prefix)`
  Returns the first input element that starts with this prefix.
  `static HtmlSelect`
  HtmlPageUtils.`getSelectEndingWith(HtmlForm form, String suffix)`
  Returns the first select element that ends with this suffix.
  `static HtmlSelect`
  HtmlPageUtils.`getSelectStartingWith(HtmlForm form, String prefix)`
  Returns the first select element that starts with this prefix.
  `static void`
  HtmlPageUtils.`select(HtmlForm form, String selectName, String optionValue)`
  Finds the HTML select element with the given name in the specified form and selects the option with the passed value.
  `static void`
  HtmlPageUtils.`selectRandomly(HtmlForm form, String selectName)`
  Finds the HTML select element with the given name in the specified form and selects one of the options randomly.
  `static void`
  HtmlPageUtils.`selectRandomly(HtmlForm form, String selectName, boolean excludeFirst)`
  Finds the HTML select element with the given name in the specified form and selects one of the options randomly.
  `static void`
  HtmlPageUtils.`selectRandomly(HtmlForm form, String selectName, boolean excludeFirst, boolean excludeLast)`
  Finds the HTML select element with the given name in the specified form and set one of the options selected randomly.
  `static void`
  HtmlPageUtils.`setCheckBoxValue(HtmlForm form, String checkBoxName, boolean isChecked)`
  Finds the HTML check box input element with the given name in the specified form and sets its value.
  `static void`
  HtmlPageUtils.`setInputValue(HtmlForm form, String inputName, String value)`
  Finds the HTML input element with the given name in the specified form and sets its value.

- ## Uses of HtmlForm in org.htmlunit.html

  Methods in org.htmlunit.html that return HtmlForm
  Modifier and Type
  Method
  Description
  `HtmlForm`
  HtmlElement.`getEnclosingForm()`
  Returns the form which contains this element, or `null` if this element is not inside of a form.
  `HtmlForm`
  HtmlElement.`getEnclosingFormOrDie()`
  Returns the form which contains this element.
  `HtmlForm`
  HtmlPage.`getFormByName(String name)`
  Returns the first form that matches the specified name.
  Methods in org.htmlunit.html that return types with arguments of type HtmlForm
  Modifier and Type
  Method
  Description
  `List<HtmlForm>`
  HtmlPage.`getForms()`
  Returns a list of all the forms in this page.
  Methods in org.htmlunit.html with parameters of type HtmlForm
  Modifier and Type
  Method
  Description
  `void`
  HtmlElement.`setOwningForm(HtmlForm form)`
  INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
  Allows the parser to connect to a form that is not a parent of this due to malformed HTML code