Class XPath2ExtractorWrapper

    • Method Detail

      • namespacesProp

        protected java.lang.String namespacesProp()
      • 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.XPath2ExtractorGui>
      • 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.XPath2Extractor>
      • getRefName

        public java.lang.String getRefName()
      • setRefName

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

        public java.lang.String getXpathQuery()
      • setXpathQuery

        public void setXpathQuery​(java.lang.String xpathQuery)
      • 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 (default value) -1 means extract all results, 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 (default value) -1 means extract all results, 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".
      • getNamespaces

        public java.util.List<java.lang.String> getNamespaces()
        List of namespaces aliases you want to use to parse the document, one line per declaration. You must specify them as follow: prefix=namespace. This implementation makes it easier to use namespaces than with the old XPathExtractor version.
      • setNamespaces

        public void setNamespaces​(java.util.List<java.lang.String> namespaces)
        List of namespaces aliases you want to use to parse the document, one line per declaration. You must specify them as follow: prefix=namespace. This implementation makes it easier to use namespaces than with the old XPathExtractor version.