Package com._4point.testing.matchers.aem
Class HtmlForm
java.lang.Object
com._4point.testing.matchers.aem.HtmlForm
Object representing an AEM HTML5 Form
-
Method Summary
Modifier and TypeMethodDescriptionstatic HtmlFormStatic factory for HtmlForm object.Gets all the field Labels as StringsgetTitle()Gets the String value of the text inside the Title element.booleanhasFieldLabel(String candidate) Checks if a field label String is among the field labels for this form.
-
Method Details
-
getTitle
Gets the String value of the text inside the Title element.- Returns:
- form title
-
create
Static factory for HtmlForm object. Creates an HtmlForm object. Parses the provided html parameter and then returns an HtmlForm obkect that can be queried for information.- Parameters:
html- bytes containing a valid HTML documentbaseUri- the baseUri for the document- Returns:
- the queriable HtmlForm object
- Throws:
IOException- if there's an error while parsing the HTML bytes
-
getFieldLabels
Gets all the field Labels as Strings- Returns:
- List of field labels
-
hasFieldLabel
Checks if a field label String is among the field labels for this form.- Parameters:
candidate- string label that will be searched for- Returns:
- true if the provided candidate is one of the field lanels
-