public class HtmlExtractor extends AbstractScopedTestElement implements PostProcessor, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_EXTRACTOR |
static java.lang.String |
EXTRACTOR_JODD |
static java.lang.String |
EXTRACTOR_JSOUP |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
HtmlExtractor() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute() |
java.lang.String |
getDefaultValue()
Get the default value for the variable if no matches are found
|
java.lang.String |
getExpression() |
java.lang.String |
getExtractor()
Get the name of the currently configured extractor
|
static Extractor |
getExtractorImpl(java.lang.String impl) |
static java.lang.String[] |
getImplementations()
Get the possible extractor implementations
|
int |
getMatchNumber() |
java.lang.String |
getMatchNumberAsString() |
java.lang.String |
getRefName() |
boolean |
isEmptyDefaultValue() |
void |
process()
Parses the response data using CSS/JQuery expressions and saving the results
into variables for use later in the test.
|
void |
setAttribute(java.lang.String attribute) |
void |
setDefaultEmptyValue(boolean defaultEmptyValue) |
void |
setDefaultValue(java.lang.String defaultValue) |
void |
setExpression(java.lang.String regex) |
void |
setExtractor(java.lang.String attribute)
Set the extractor.
|
void |
setMatchNumber(int matchNumber)
Set which Match to use.
|
void |
setMatchNumber(java.lang.String matchNumber) |
void |
setRefName(java.lang.String refName) |
fetchScope, getSampleList, getScopeName, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
removed
public static final java.lang.String EXTRACTOR_JSOUP
public static final java.lang.String EXTRACTOR_JODD
public static final java.lang.String DEFAULT_EXTRACTOR
public static java.lang.String[] getImplementations()
public void process()
process
in interface PostProcessor
PostProcessor.process()
public static Extractor getExtractorImpl(java.lang.String impl)
impl
- Extractor implementationpublic void setExtractor(java.lang.String attribute)
getImplementations()
attribute
- The name of the extractor to be usedpublic java.lang.String getExtractor()
public void setAttribute(java.lang.String attribute)
public java.lang.String getAttribute()
public void setExpression(java.lang.String regex)
public java.lang.String getExpression()
public void setRefName(java.lang.String refName)
public java.lang.String getRefName()
public void setMatchNumber(int matchNumber)
0
, which is interpreted as meaning random.matchNumber
- The number of the match to be usedpublic void setMatchNumber(java.lang.String matchNumber)
public int getMatchNumber()
public java.lang.String getMatchNumberAsString()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- value of the variable if no matches are foundpublic void setDefaultEmptyValue(boolean defaultEmptyValue)
defaultEmptyValue
- boolean set value to "" if not foundpublic java.lang.String getDefaultValue()
public boolean isEmptyDefaultValue()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.