public class HtmlExtractor extends AbstractScopedTestElement implements PostProcessor, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXTRACTOR |
static String |
EXTRACTOR_JODD |
static String |
EXTRACTOR_JSOUP |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
HtmlExtractor() |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute() |
String |
getDefaultValue()
Get the default value for the variable if no matches are found
|
String |
getExpression() |
String |
getExtractor()
Get the name of the currently configured extractor
|
static Extractor |
getExtractorImpl(String impl) |
static String[] |
getImplementations()
Get the possible extractor implementations
|
int |
getMatchNumber() |
String |
getMatchNumberAsString() |
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(String attribute) |
void |
setDefaultEmptyValue(boolean defaultEmptyValue) |
void |
setDefaultValue(String defaultValue) |
void |
setExpression(String regex) |
void |
setExtractor(String attribute)
Set the extractor.
|
void |
setMatchNumber(int matchNumber)
Set which Match to use.
|
void |
setMatchNumber(String matchNumber) |
void |
setRefName(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 String EXTRACTOR_JSOUP
public static final String EXTRACTOR_JODD
public static final String DEFAULT_EXTRACTOR
public static String[] getImplementations()
public void process()
process
in interface PostProcessor
PostProcessor.process()
public static Extractor getExtractorImpl(String impl)
impl
- Extractor implementationpublic void setExtractor(String attribute)
getImplementations()
attribute
- The name of the extractor to be usedpublic String getExtractor()
public void setAttribute(String attribute)
public String getAttribute()
public void setExpression(String regex)
public String getExpression()
public void setRefName(String refName)
public 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(String matchNumber)
public int getMatchNumber()
public String getMatchNumberAsString()
public void setDefaultValue(String defaultValue)
defaultValue
- value of the variable if no matches are foundpublic void setDefaultEmptyValue(boolean defaultEmptyValue)
defaultEmptyValue
- boolean set value to "" if not foundpublic String getDefaultValue()
public boolean isEmptyDefaultValue()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.