Serializable
, Cloneable
, Searchable
, PostProcessor
, TestElement
public class HtmlExtractor extends AbstractScopedTestElement implements PostProcessor, Serializable
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_EXTRACTOR |
|
static String |
EXTRACTOR_JODD |
|
static String |
EXTRACTOR_JSOUP |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor | Description |
---|---|
HtmlExtractor() |
Modifier and Type | Method | 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() |
|
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 |
setDefaultValue(String defaultValue) |
Sets the value of the variable if no matches are found
|
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
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 final 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
- The default value for the variablepublic String getDefaultValue()
Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.