Package org.htmlunit.html.serializer
Class HtmlSerializerVisibleText
- java.lang.Object
-
- org.htmlunit.html.serializer.HtmlSerializerVisibleText
-
public class HtmlSerializerVisibleText extends java.lang.ObjectSpecial serializer to generate the output we need at least for selenium WebElement#getText().This is also used from estimations by ComputedCSSStyleDeclaration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classHtmlSerializerVisibleText.HtmlSerializerTextBuilderprotected static classHtmlSerializerVisibleText.ModeMode.
-
Constructor Summary
Constructors Constructor Description HtmlSerializerVisibleText()
-
Method Summary
-
-
-
Method Detail
-
asText
public java.lang.String asText(DomNode node)
Converts an HTML node to text.- Parameters:
node- a node- Returns:
- the text representation according to the setting of this serializer
-
appendChildren
protected void appendChildren(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, DomNode node, HtmlSerializerVisibleText.Mode mode)
Iterate over all Children and call appendNode() for every.- Parameters:
builder- the StringBuilder to add tonode- the node to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendNode
protected void appendNode(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, DomNode node, HtmlSerializerVisibleText.Mode mode)
The core distribution method call the different appendXXX methods depending on the type of the given node.- Parameters:
builder- the StringBuilder to add tonode- the node to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendDomNode
protected void appendDomNode(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, DomNode domNode, HtmlSerializerVisibleText.Mode mode)
ProcessDomNode.- Parameters:
builder- the StringBuilder to add todomNode- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendHiddenInput
protected void appendHiddenInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlHiddenInput htmlHiddenInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlHiddenInput.- Parameters:
builder- the StringBuilder to add tohtmlHiddenInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendScript
protected void appendScript(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlScript htmlScript, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlScript.- Parameters:
builder- the StringBuilder to add tohtmlScript- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendStyle
protected void appendStyle(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlStyle htmlStyle, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlStyle.- Parameters:
builder- the StringBuilder to add tohtmlStyle- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendNoScript
protected void appendNoScript(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlNoScript htmlNoScript, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlNoScript.- Parameters:
builder- the StringBuilder to add tohtmlNoScript- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendNoFrames
protected void appendNoFrames(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlNoFrames htmlNoFrames, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlNoFrames.- Parameters:
builder- the StringBuilder to add tohtmlNoFrames- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendSubmitInput
protected void appendSubmitInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlSubmitInput htmlSubmitInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlSubmitInput.- Parameters:
builder- the StringBuilder to add tohtmlSubmitInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendInput
protected void appendInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlInput htmlInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlInput.- Parameters:
builder- the StringBuilder to add tohtmlInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendResetInput
protected void appendResetInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlResetInput htmlResetInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlResetInput.- Parameters:
builder- the StringBuilder to add tohtmlResetInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendMenu
protected void appendMenu(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlMenu htmlMenu, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlMenu.- Parameters:
builder- the StringBuilder to add tohtmlMenu- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendDetails
protected void appendDetails(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlDetails htmlDetails, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlDetails.- Parameters:
builder- the StringBuilder to add tohtmlDetails- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendTitle
protected void appendTitle(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlTitle htmlTitle, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlTitle.- Parameters:
builder- the StringBuilder to add tohtmlTitle- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendTableRow
protected void appendTableRow(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlTableRow htmlTableRow, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlTableRow.- Parameters:
builder- the StringBuilder to add tohtmlTableRow- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
isDisplayed
protected boolean isDisplayed(DomNode domNode)
Check domNode visibility.- Parameters:
domNode- the node to check- Returns:
- true or false
-
appendTextArea
protected void appendTextArea(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlTextArea htmlTextArea, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlTextArea.- Parameters:
builder- the StringBuilder to add tohtmlTextArea- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendTable
protected void appendTable(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlTable htmlTable, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlTable.- Parameters:
builder- the StringBuilder to add tohtmlTable- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendTableRows
protected boolean appendTableRows(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlSerializerVisibleText.Mode mode, java.util.List<HtmlTableRow> rows, boolean first, TableRowGroup skipParent1, TableRowGroup skipParent2)
ProcessHtmlTableRow.- Parameters:
builder- the StringBuilder to add tomode- theHtmlSerializerVisibleText.Modeto use for processingrows- the rowsfirst- if true this is the first oneskipParent1- skip row if the parent is thisskipParent2- skip row if the parent is this- Returns:
- true if this was the first one
-
appendSelect
protected void appendSelect(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlSelect htmlSelect, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlSelect.- Parameters:
builder- the StringBuilder to add tohtmlSelect- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendOption
protected void appendOption(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlOption htmlOption, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlSelect.- Parameters:
builder- the StringBuilder to add tohtmlOption- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendOrderedList
protected void appendOrderedList(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlOrderedList htmlOrderedList, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlOrderedList.- Parameters:
builder- the StringBuilder to add tohtmlOrderedList- the OL elementmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendUnorderedList
protected void appendUnorderedList(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlUnorderedList htmlUnorderedList, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlUnorderedList.- Parameters:
builder- the StringBuilder to add tohtmlUnorderedList- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendPreformattedText
protected void appendPreformattedText(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlPreformattedText htmlPreformattedText, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlPreformattedText.- Parameters:
builder- the StringBuilder to add tohtmlPreformattedText- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendInlineFrame
protected void appendInlineFrame(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlInlineFrame htmlInlineFrame, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlInlineFrame.- Parameters:
builder- the StringBuilder to add tohtmlInlineFrame- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendText
protected void appendText(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, DomText domText, HtmlSerializerVisibleText.Mode mode)
ProcessDomText.- Parameters:
builder- the StringBuilder to add todomText- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendComment
protected void appendComment(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, DomComment domComment, HtmlSerializerVisibleText.Mode mode)
ProcessDomComment.- Parameters:
builder- the StringBuilder to add todomComment- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendBreak
protected void appendBreak(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlBreak htmlBreak, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlBreak.- Parameters:
builder- the StringBuilder to add tohtmlBreak- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendCheckBoxInput
protected void appendCheckBoxInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlCheckBoxInput htmlCheckBoxInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlCheckBoxInput.- Parameters:
builder- the StringBuilder to add tohtmlCheckBoxInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
appendRadioButtonInput
protected void appendRadioButtonInput(HtmlSerializerVisibleText.HtmlSerializerTextBuilder builder, HtmlRadioButtonInput htmlRadioButtonInput, HtmlSerializerVisibleText.Mode mode)
ProcessHtmlRadioButtonInput.- Parameters:
builder- the StringBuilder to add tohtmlRadioButtonInput- the target to processmode- theHtmlSerializerVisibleText.Modeto use for processing
-
whiteSpaceStyle
protected HtmlSerializerVisibleText.Mode whiteSpaceStyle(DomNode domNode, HtmlSerializerVisibleText.Mode defaultMode)
-
updateWhiteSpaceStyle
protected HtmlSerializerVisibleText.Mode updateWhiteSpaceStyle(DomNode domNode, HtmlSerializerVisibleText.Mode defaultMode)
-
-