| java.lang.Object com.canoo.webtest.util.FormUtil
FormUtil | public class FormUtil (Code) | | Utilities for working with forms.
author: Paul King |
Method Summary | |
public static HtmlForm | findFormByIndex(HtmlPage currentResp, String indexStr) | public static HtmlForm | findFormByName(HtmlPage currentResp, String name) | public static HtmlForm | findFormForField(Context context, String givenFormName, String tag, String type, String name, Step step) Gets the form from the current response containing the desired field. | public static HtmlForm | findFormForTextField(Context context, String givenFormName, String name, Step step) Gets the form from the current response containing the desired text field. | public static boolean | hasTextField(HtmlForm form, String name) Indicates if the form has a "text field" (text, password or textarea) with the given name. |
findFormByIndex | public static HtmlForm findFormByIndex(HtmlPage currentResp, String indexStr)(Code) | | |
findFormByName | public static HtmlForm findFormByName(HtmlPage currentResp, String name)(Code) | | |
findFormForField | public static HtmlForm findFormForField(Context context, String givenFormName, String tag, String type, String name, Step step)(Code) | | Gets the form from the current response containing the desired field. If there is a current form then this form is
considered, else the first form containing such a field (this form is then set as the current form for further
calls). Note: the test is currently only performed on the name of the field.
Parameters: context - Parameters: givenFormName - Parameters: tag - the html tag corresponding to the field Parameters: type - the type of the input field (html attribute "type") if tag is "input" Parameters: name - the name of the input field (html attribute "name") Parameters: step - null if no form found. |
findFormForTextField | public static HtmlForm findFormForTextField(Context context, String givenFormName, String name, Step step)(Code) | | Gets the form from the current response containing the desired text field. If there is a current form then this form
is considered, else the first form containing such a field (this form is then set a the current form for further
calls).
Parameters: context - Parameters: givenFormName - Parameters: name - the name of the text field of interest (<input type="text"...> or<input type="password" ...> or <textarea ...>...</textarea>) Parameters: step - null if no form found. |
hasTextField | public static boolean hasTextField(HtmlForm form, String name)(Code) | | Indicates if the form has a "text field" (text, password or textarea) with the given name.
|
|
|