public class FormUtil
extends java.lang.Object
Constructor and Description |
---|
FormUtil() |
Modifier and Type | Method and Description |
---|---|
static com.gargoylesoftware.htmlunit.html.HtmlForm |
findFormByIndex(com.gargoylesoftware.htmlunit.html.HtmlPage currentResp,
java.lang.String indexStr) |
static com.gargoylesoftware.htmlunit.html.HtmlForm |
findFormByName(com.gargoylesoftware.htmlunit.html.HtmlPage currentResp,
java.lang.String name) |
static com.gargoylesoftware.htmlunit.html.HtmlForm |
findFormForField(Context context,
java.lang.String givenFormName,
java.lang.String tag,
java.lang.String type,
java.lang.String name,
Step step)
Gets the form from the current response containing the desired field.
|
static com.gargoylesoftware.htmlunit.html.HtmlForm |
findFormForTextField(Context context,
java.lang.String givenFormName,
java.lang.String name,
Step step)
Gets the form from the current response containing the desired text field.
|
static boolean |
hasTextField(com.gargoylesoftware.htmlunit.html.HtmlForm form,
java.lang.String name)
Indicates if the form has a "text field" (text, password or textarea) with the given name.
|
public static boolean hasTextField(com.gargoylesoftware.htmlunit.html.HtmlForm form, java.lang.String name)
public static com.gargoylesoftware.htmlunit.html.HtmlForm findFormForField(Context context, java.lang.String givenFormName, java.lang.String tag, java.lang.String type, java.lang.String name, Step step)
context
- givenFormName
- tag
- the html tag corresponding to the fieldtype
- the type of the input field (html attribute "type") if tag is "input"name
- the name of the input field (html attribute "name")step
- null
if no form found.public static com.gargoylesoftware.htmlunit.html.HtmlForm findFormForTextField(Context context, java.lang.String givenFormName, java.lang.String name, Step step)
context
- givenFormName
- name
- the name of the text field of interest (<input type="text"...> or
<input type="password" ...> or <textarea ...>...</textarea>)step
- null
if no form found.public static com.gargoylesoftware.htmlunit.html.HtmlForm findFormByName(com.gargoylesoftware.htmlunit.html.HtmlPage currentResp, java.lang.String name)
public static com.gargoylesoftware.htmlunit.html.HtmlForm findFormByIndex(com.gargoylesoftware.htmlunit.html.HtmlPage currentResp, java.lang.String indexStr)