Class XPathExtractorWrapper

    • 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.XPathExtractorGui>
      • 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.XPathExtractor>
      • getRefName

        public java.lang.String getRefName()
        The name of the JMeter variable in which to store the result.
      • setRefName

        public void setRefName​(java.lang.String refName)
        The name of the JMeter variable in which to store the result.
      • getXpathQuery

        public java.lang.String getXpathQuery()
        Element query in XPath language. Can return more than one match.
      • setXpathQuery

        public void setXpathQuery​(java.lang.String xpathQuery)
        Element query in XPath language. Can return more than one match.
      • getMatchNumber

        public java.lang.String getMatchNumber()
        If the XPath Path query leads to many results, you can choose which one(s) to extract as Variables:

        0: means random -1 means extract all results (default value), they will be named as <variable name>_N (where N goes from 1 to Number of results) X: means extract the Xth result. If this Xth is greater than number of matches, then nothing is returned. Default value will be used

      • setMatchNumber

        public void setMatchNumber​(java.lang.String matchNumber)
        If the XPath Path query leads to many results, you can choose which one(s) to extract as Variables:

        0: means random -1 means extract all results (default value), they will be named as <variable name>_N (where N goes from 1 to Number of results) X: means extract the Xth result. If this Xth is greater than number of matches, then nothing is returned. Default value will be used

      • getDefaultValue

        public java.lang.String getDefaultValue()
        Default value returned when no match found. It is also returned if the node has no value and the fragment option is not selected.
      • setDefaultValue

        public void setDefaultValue​(java.lang.String defaultValue)
        Default value returned when no match found. It is also returned if the node has no value and the fragment option is not selected.
      • isFragment

        public boolean isFragment()
        If selected, the fragment will be returned rather than the text content. For example //title would return "<title>Apache JMeter</title>" rather than "Apache JMeter". In this case, //title/text() would return "Apache JMeter".
      • setFragment

        public void setFragment​(boolean fragment)
        If selected, the fragment will be returned rather than the text content. For example //title would return "<title>Apache JMeter</title>" rather than "Apache JMeter". In this case, //title/text() would return "Apache JMeter".
      • isValidate

        public boolean isValidate()
        Check the document against its schema. (If Tidy is not selected).
      • setValidate

        public void setValidate​(boolean validate)
        Check the document against its schema. (If Tidy is not selected).
      • isNamespace

        public boolean isNamespace()
        If checked, then the XML parser will use namespace resolution.(see note below on NAMESPACES) Note that currently only namespaces declared on the root element will be recognised. See below for user-definition of additional workspace names. (If Tidy is not selected).
      • setNamespace

        public void setNamespace​(boolean namespace)
        If checked, then the XML parser will use namespace resolution.(see note below on NAMESPACES) Note that currently only namespaces declared on the root element will be recognised. See below for user-definition of additional workspace names. (If Tidy is not selected).
      • isWhitespace

        public boolean isWhitespace()
        Ignore Element Whitespace. (If Tidy is not selected).
      • setWhitespace

        public void setWhitespace​(boolean whitespace)
        Ignore Element Whitespace. (If Tidy is not selected).
      • isDownloadDtds

        public boolean isDownloadDtds()
        If selected, external DTDs are fetched. (If Tidy is not selected).
      • setDownloadDtds

        public void setDownloadDtds​(boolean downloadDtds)
        If selected, external DTDs are fetched. (If Tidy is not selected).
      • isUseTidy

        public boolean isUseTidy()
        If checked use Tidy to parse HTML response into XHTML.

        "Use Tidy" should be checked on for HTML response. Such response is converted to valid XHTML (XML compatible HTML) using Tidy "Use Tidy" should be unchecked for both XHTML or XML response (for example RSS)

      • setUseTidy

        public void setUseTidy​(boolean useTidy)
        If checked use Tidy to parse HTML response into XHTML.

        "Use Tidy" should be checked on for HTML response. Such response is converted to valid XHTML (XML compatible HTML) using Tidy "Use Tidy" should be unchecked for both XHTML or XML response (for example RSS)

      • isTidyQuiet

        public boolean isTidyQuiet()
        Sets the Tidy Quiet flag.
      • setTidyQuiet

        public void setTidyQuiet​(boolean tidyQuiet)
        Sets the Tidy Quiet flag.
      • isTidyReportErrors

        public boolean isTidyReportErrors()
        If a Tidy error occurs, then set the Assertion accordingly.
      • setTidyReportErrors

        public void setTidyReportErrors​(boolean tidyReportErrors)
        If a Tidy error occurs, then set the Assertion accordingly.
      • isTidyShowWarnings

        public boolean isTidyShowWarnings()
        Sets the Tidy showWarnings option.
      • setTidyShowWarnings

        public void setTidyShowWarnings​(boolean tidyShowWarnings)
        Sets the Tidy showWarnings option.