org.apache.jmeter.extractor
Class XPathExtractor
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.extractor.XPathExtractor
- All Implemented Interfaces:
- Serializable, Cloneable, PostProcessor, TestElement
public class XPathExtractor
- extends AbstractTestElement
- implements PostProcessor, Serializable
Extracts text from (X)HTML response using XPath query language
Example XPath queries:
- /html/head/title
- extracts Title from HTML response
- //form[@name='countryForm']//select[@name='country']/option[text()='Czech Republic'])/@value
- extracts value attribute of option element that match text 'Czech Republic'
inside of select element with name attribute 'country' inside of
form with name attribute 'countryForm'
- See Also:
- Serialized Form
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, addTestElement, canRemove, clear, clearTemporary, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty |
XPathExtractor
public XPathExtractor()
process
public void process()
- Do the job - extract value from (X)HTML response using XPath Query.
Return value as variable defined by REFNAME. Returns DEFAULT value
if not found.
- Specified by:
process
in interface PostProcessor
clone
public Object clone()
- Specified by:
clone
in interface TestElement
- Overrides:
clone
in class AbstractTestElement
setXPathQuery
public void setXPathQuery(String val)
getXPathQuery
public String getXPathQuery()
setRefName
public void setRefName(String refName)
getRefName
public String getRefName()
setDefaultValue
public void setDefaultValue(String val)
getDefaultValue
public String getDefaultValue()
setTolerant
public void setTolerant(boolean val)
isTolerant
public boolean isTolerant()
setNameSpace
public void setNameSpace(boolean val)
useNameSpace
public boolean useNameSpace()
setReportErrors
public void setReportErrors(boolean val)
reportErrors
public boolean reportErrors()
setShowWarnings
public void setShowWarnings(boolean val)
showWarnings
public boolean showWarnings()
setQuiet
public void setQuiet(boolean val)
isQuiet
public boolean isQuiet()
Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.