Class HtmlExtractorWrapper

    • Method Detail

      • getGuiClass

        public java.lang.Class<?> getGuiClass()
        Description copied from interface: JMeterGUIWrapper
        Gui Test Class used by Jmeter TestElement.GUI_CLASS @See TestElement
        Specified by:
        getGuiClass in interface JMeterGUIWrapper<org.apache.jmeter.extractor.gui.HtmlExtractorGui>
      • getTestClass

        public java.lang.Class<?> getTestClass()
        Description copied from interface: TestElementWrapper
        Test Class used by Jmeter TestElement.TEST_CLASS. @See TestElement.
        Specified by:
        getTestClass in interface TestElementWrapper<org.apache.jmeter.extractor.HtmlExtractor>
      • getRefName

        public java.lang.String getRefName()
      • setRefName

        public void setRefName​(java.lang.String refName)
      • getQueryExpression

        public java.lang.String getQueryExpression()
        The CSS/JQuery selector used to select nodes from the response data. Selector, selectors combination and pseudo-selectors are supported.
      • setQueryExpression

        public void setQueryExpression​(java.lang.String queryExpression)
        The CSS/JQuery selector used to select nodes from the response data. Selector, selectors combination and pseudo-selectors are supported.
      • getAttribute

        public java.lang.String getAttribute()
        Name of attribute (as per HTML syntax) to extract from nodes that matched the selector. If empty, then the combined text of this element and all its children will be returned.
      • setAttribute

        public void setAttribute​(java.lang.String attribute)
        Name of attribute (as per HTML syntax) to extract from nodes that matched the selector. If empty, then the combined text of this element and all its children will be returned.
      • getMatchNumber

        public java.lang.String getMatchNumber()
        Indicates which match to use. The CSS/JQuery selector may match multiple times.

        Use a value of zero to indicate JMeter should choose a match at random. A positive number N means to select the nth match. Negative numbers are used in conjunction with the ForEach Controller - see below.

      • setMatchNumber

        public void setMatchNumber​(java.lang.String matchNumber)
        Indicates which match to use. The CSS/JQuery selector may match multiple times.

        Use a value of zero to indicate JMeter should choose a match at random. A positive number N means to select the nth match. Negative numbers are used in conjunction with the ForEach Controller - see below.

      • isDefaultEmpty

        public boolean isDefaultEmpty()
        f the checkbox is checked and Default Value is empty, then JMeter will set the variable to empty string instead of not setting it. Thus when you will for example use ${var} (if Reference Name is var) in your Test Plan, if the extracted value is not found then ${var} will be equal to empty string instead of containing ${var} which may be useful if extracted value is optional.
      • setDefaultEmpty

        public void setDefaultEmpty​(boolean defaultEmpty)
        f the checkbox is checked and Default Value is empty, then JMeter will set the variable to empty string instead of not setting it. Thus when you will for example use ${var} (if Reference Name is var) in your Test Plan, if the extracted value is not found then ${var} will be equal to empty string instead of containing ${var} which may be useful if extracted value is optional.
      • getDefaultValue

        public java.lang.String getDefaultValue()
        If the expression does not match, then the reference variable will be set to the default value. This is particularly useful for debugging tests. If no default is provided, then it is difficult to tell whether the expression did not match, or the CSS/JQuery element was not processed or maybe the wrong variable is being used.

        However, if you have several test elements that set the same variable, you may wish to leave the variable unchanged if the expression does not match. In this case, remove the default value once debugging is complete. .

      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
        If the expression does not match, then the reference variable will be set to the default value. This is particularly useful for debugging tests. If no default is provided, then it is difficult to tell whether the expression did not match, or the CSS/JQuery element was not processed or maybe the wrong variable is being used.

        However, if you have several test elements that set the same variable, you may wish to leave the variable unchanged if the expression does not match. In this case, remove the default value once debugging is complete. .