Class HtmlExtractorWrapper
- java.lang.Object
-
- org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicTestElementWrapper<T>
-
- org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicChildTestElementWrapper<T>
-
- org.anasoid.jmc.core.wrapper.jmeter.testelement.AbstractScopedTestElementWrapper<org.apache.jmeter.extractor.HtmlExtractor,org.apache.jmeter.extractor.gui.HtmlExtractorGui>
-
- org.anasoid.jmc.core.wrapper.jmeter.extractor.HtmlExtractorWrapper
-
- All Implemented Interfaces:
java.io.Serializable,Validator,JMeterGUIWrapper<org.apache.jmeter.extractor.gui.HtmlExtractorGui>,PostProcessorWrapper<org.apache.jmeter.extractor.HtmlExtractor>,TestElementTreeNodeWrapper<org.apache.jmeter.extractor.HtmlExtractor>,TestElementWrapper<org.apache.jmeter.extractor.HtmlExtractor>
@JmcDefaultName("CSS Selector Extractor") public class HtmlExtractorWrapper extends AbstractScopedTestElementWrapper<org.apache.jmeter.extractor.HtmlExtractor,org.apache.jmeter.extractor.gui.HtmlExtractorGui> implements PostProcessorWrapper<org.apache.jmeter.extractor.HtmlExtractor>, Validator
Wrapper for HtmlExtractor. AKA : CSS Selector Extractor.- See Also:
HtmlExtractor, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHtmlExtractorWrapper.ExtractorImplenum for extractor_impl.static classHtmlExtractorWrapper.HtmlExtractorWrapperBuilder<C extends HtmlExtractorWrapper,B extends HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<C,B>>-
Nested classes/interfaces inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.AbstractScopedTestElementWrapper
AbstractScopedTestElementWrapper.AbstractScopedTestElementWrapperBuilder<T extends org.apache.jmeter.testelement.AbstractScopedTestElement,G extends org.apache.jmeter.gui.AbstractScopedJMeterGuiComponent,C extends AbstractScopedTestElementWrapper<T,G>,B extends AbstractScopedTestElementWrapper.AbstractScopedTestElementWrapperBuilder<T,G,C,B>>
-
Nested classes/interfaces inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicChildTestElementWrapper
AbstractBasicChildTestElementWrapper.AbstractBasicChildTestElementWrapperBuilder<T extends org.apache.jmeter.testelement.AbstractTestElement,C extends AbstractBasicChildTestElementWrapper<T>,B extends AbstractBasicChildTestElementWrapper.AbstractBasicChildTestElementWrapperBuilder<T,C,B>>
-
Nested classes/interfaces inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicTestElementWrapper
AbstractBasicTestElementWrapper.AbstractBasicTestElementWrapperBuilder<T extends org.apache.jmeter.testelement.AbstractTestElement,C extends AbstractBasicTestElementWrapper<T>,B extends AbstractBasicTestElementWrapper.AbstractBasicTestElementWrapperBuilder<T,C,B>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHtmlExtractorWrapper(HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?>builder()java.lang.StringgetAttribute()Name of attribute (as per HTML syntax) to extract from nodes that matched the selector.java.lang.StringgetDefaultValue()If the expression does not match, then the reference variable will be set to the default value.HtmlExtractorWrapper.ExtractorImplgetExtractorImplementation()java.lang.Class<?>getGuiClass()Gui Test Class used by Jmeter TestElement.GUI_CLASS @See TestElementjava.lang.StringgetMatchNumber()Indicates which match to use.java.lang.StringgetQueryExpression()The CSS/JQuery selector used to select nodes from the response data.java.lang.StringgetRefName()java.lang.Class<?>getTestClass()Test Class used by Jmeter TestElement.TEST_CLASS.booleanisDefaultEmpty()f the checkbox is checked and Default Value is empty, then JMeter will set the variable to empty string instead of not setting it.voidsetAttribute(java.lang.String attribute)Name of attribute (as per HTML syntax) to extract from nodes that matched the selector.voidsetDefaultEmpty(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.voidsetDefaultValue(java.lang.String defaultValue)If the expression does not match, then the reference variable will be set to the default value.voidsetExtractorImplementation(HtmlExtractorWrapper.ExtractorImpl extractorImplementation)voidsetMatchNumber(java.lang.String matchNumber)Indicates which match to use.voidsetQueryExpression(java.lang.String queryExpression)The CSS/JQuery selector used to select nodes from the response data.voidsetRefName(java.lang.String refName)HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?>toBuilder()voidvalidate()Validate Test element.-
Methods inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.AbstractScopedTestElementWrapper
getScope, getScopeVariable, setScope
-
Methods inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicChildTestElementWrapper
getComment, getName, isEnabled, setComment, setEnabled, setName, toString
-
Methods inherited from class org.anasoid.jmc.core.wrapper.jmeter.testelement.basic.AbstractBasicTestElementWrapper
getChildren, getGuiClassAsString, getTags, getTestClassAsString, init, internalInit, isFullClassName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.anasoid.jmc.core.wrapper.jmeter.testelement.TestElementWrapper
getChildren, getTags, getTestClassAsString, init
-
-
-
-
Constructor Detail
-
HtmlExtractorWrapper
protected HtmlExtractorWrapper(HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?> b)
-
-
Method Detail
-
validate
public void validate() throws ConversionIllegalStateExceptionDescription copied from interface:ValidatorValidate Test element.- Specified by:
validatein interfaceValidator- Throws:
ConversionIllegalStateException
-
getGuiClass
public java.lang.Class<?> getGuiClass()
Description copied from interface:JMeterGUIWrapperGui Test Class used by Jmeter TestElement.GUI_CLASS @See TestElement- Specified by:
getGuiClassin interfaceJMeterGUIWrapper<org.apache.jmeter.extractor.gui.HtmlExtractorGui>
-
getTestClass
public java.lang.Class<?> getTestClass()
Description copied from interface:TestElementWrapperTest Class used by Jmeter TestElement.TEST_CLASS. @See TestElement.- Specified by:
getTestClassin interfaceTestElementWrapper<org.apache.jmeter.extractor.HtmlExtractor>
-
builder
public static HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?> builder()
-
toBuilder
public HtmlExtractorWrapper.HtmlExtractorWrapperBuilder<?,?> toBuilder()
-
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. .
-
getExtractorImplementation
public HtmlExtractorWrapper.ExtractorImpl getExtractorImplementation()
-
setExtractorImplementation
public void setExtractorImplementation(HtmlExtractorWrapper.ExtractorImpl extractorImplementation)
-
-