Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jmeter.extractor
Class XPathExtractor

    java.lang.Object
      org.apache.jmeter.testelement.AbstractTestElement
          org.apache.jmeter.extractor.XPathExtractor

All Implemented Interfaces:
  Cloneable, PostProcessor, Serializable, 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

Field Summary

Fields inherited from interface org.apache.jmeter.testelement.TestElement
`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

Constructor Summary
`XPathExtractor()`

Method Summary
`Object` | `clone()`
`String` | `getDefaultValue()`
`String` | `getRefName()`
`String` | `getXPathQuery()`
`boolean` | `isQuiet()`
`boolean` | `isTolerant()`
`void` | `process()` Do the job - extract value from (X)HTML response using XPath Query.
`boolean` | `reportErrors()`
`void` | `setDefaultValue(String val)`
`void` | `setNameSpace(boolean val)`
`void` | `setQuiet(boolean val)`
`void` | `setRefName(String refName)`
`void` | `setReportErrors(boolean val)`
`void` | `setShowWarnings(boolean val)`
`void` | `setTolerant(boolean val)`
`void` | `setXPathQuery(String val)`
`boolean` | `showWarnings()`
`boolean` | `useNameSpace()`

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`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XPathExtractor

    public XPathExtractor()

Method Detail

### 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()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.