|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||
java.lang.Objectcom.actimind.actiwate.testing.html.util.HTMLUtil
Utility methods for HTML elements
| Constructor Summary | |
HTMLUtil()
|
|
| Method Summary | |
static boolean |
containsText(java.lang.String htmlText,
java.lang.String expectedText)
Returns true if html text contains specified text. |
static java.lang.String |
describeElement(org.w3c.dom.html.HTMLElement element)
Makes human readable description of HTML element. |
static java.lang.String |
describeNode(org.w3c.dom.Node node)
Makes human readable description of document node. |
static void |
describeNode(java.lang.StringBuffer buffer,
org.w3c.dom.Node node)
|
static java.lang.String |
getTextWithin(org.w3c.dom.html.HTMLElement element,
boolean normalize)
Returns text within element: concatenates all text nodes within element and returns them as single string object. |
static java.lang.String |
normalize(java.lang.String stringToNormalize)
Normalizes specified string. |
static boolean |
normalizedEquals(org.w3c.dom.html.HTMLElement element,
java.lang.String expectedTextInElement)
Returns true if element's text equals to specified text after normalization. |
static boolean |
normalizedEquals(java.lang.String actualText,
java.lang.String expectedText)
Returns true if actual text equals to expected text after normalization. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HTMLUtil()
| Method Detail |
public static java.lang.String getTextWithin(org.w3c.dom.html.HTMLElement element,
boolean normalize)
element - element to retrieve text fromnormalize - if true then text will be normalized before being returned
public static java.lang.String normalize(java.lang.String stringToNormalize)
stringToNormalize - string to normalize
public static boolean containsText(java.lang.String htmlText,
java.lang.String expectedText)
htmlText - an html text: text retrived from html elementexpectedText - text expected to be contained in html text
public static boolean normalizedEquals(org.w3c.dom.html.HTMLElement element,
java.lang.String expectedTextInElement)
element - element to search test inexpectedTextInElement - text expected to be in element
public static boolean normalizedEquals(java.lang.String actualText,
java.lang.String expectedText)
actualText - actual textexpectedText - expected text
public static java.lang.String describeElement(org.w3c.dom.html.HTMLElement element)
element - HTML element
public static java.lang.String describeNode(org.w3c.dom.Node node)
node - Document node
public static void describeNode(java.lang.StringBuffer buffer,
org.w3c.dom.Node node)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||