Class HtmlExtractor

All Implemented Interfaces:
Serializable, Cloneable, Searchable, PostProcessor, org.apache.jmeter.testelement.TestElement

public class HtmlExtractor extends AbstractScopedTestElement implements PostProcessor, Serializable
See Also:
  • Field Details

  • Constructor Details

    • HtmlExtractor

      public HtmlExtractor()
  • Method Details

    • getImplementations

      public static String[] getImplementations()
      Get the possible extractor implementations
      Array containing the names of the possible extractors.
    • process

      public void process()
      Parses the response data using CSS/JQuery expressions and saving the results into variables for use later in the test.
      Specified by:
      process in interface PostProcessor
      See Also:
    • getExtractorImpl

      public static Extractor getExtractorImpl(String impl)
      impl - Extractor implementation
    • setExtractor

      public void setExtractor(String attribute)
      Set the extractor. Has to be one of the list that can be obtained by getImplementations()
      attribute - The name of the extractor to be used
    • getExtractor

      public String getExtractor()
      Get the name of the currently configured extractor
      The name of the extractor currently used
    • setAttribute

      public void setAttribute(String attribute)
    • getAttribute

      public String getAttribute()
    • setExpression

      public void setExpression(String regex)
    • getExpression

      public String getExpression()
    • setRefName

      public void setRefName(String refName)
    • getRefName

      public String getRefName()
    • setMatchNumber

      public void setMatchNumber(int matchNumber)
      Set which Match to use. This can be any positive number, indicating the exact match to use, or 0, which is interpreted as meaning random.
      matchNumber - The number of the match to be used
    • setMatchNumber

      public void setMatchNumber(String matchNumber)
    • getMatchNumber

      public int getMatchNumber()
    • getMatchNumberAsString

      public String getMatchNumberAsString()
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      defaultValue - value of the variable if no matches are found
    • setDefaultEmptyValue

      public void setDefaultEmptyValue(boolean defaultEmptyValue)
      defaultEmptyValue - boolean set value to "" if not found
    • getDefaultValue

      public String getDefaultValue()
      Get the default value for the variable if no matches are found
      The default value for the variable
    • isEmptyDefaultValue

      public boolean isEmptyDefaultValue()
      boolean set value to "" if not found