Package com.xceptance.xlt.api.actions
Class AbstractXmlPageAction
- java.lang.Object
-
- com.xceptance.xlt.api.actions.AbstractAction
-
- com.xceptance.xlt.api.actions.AbstractWebAction
-
- com.xceptance.xlt.api.actions.AbstractXmlPageAction
-
public abstract class AbstractXmlPageAction extends AbstractWebAction
AbstractXmlPageAction is the base class for all actions that load an arbitrary XML snippet. The loaded page is parsed and stored internally as a tree of elements. This makes it easy to locate and query/manipulate a certain page element.
-
-
Field Summary
-
Fields inherited from class com.xceptance.xlt.api.actions.AbstractWebAction
EMPTY_PARAMETER_LIST
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractXmlPageAction(AbstractWebAction previousAction, java.lang.String timerName)
Creates a new AbstractXmlPageAction object and gives it the passed timer name.protected
AbstractXmlPageAction(java.lang.String timerName)
Creates a new AbstractXmlPageAction object and gives it the passed timer name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlPage
getXmlPage()
Returns the parsed XML page object generated by this action.protected void
loadXMLPage(java.net.URL url)
Loads the page from the passed URL.protected void
validateHttpResponseCode(int expected)
Validates the HTTP response code.-
Methods inherited from class com.xceptance.xlt.api.actions.AbstractWebAction
addResponseProcessor, closeWebClient, createWebRequestSettings, getPreviousAction, getWebClient, run
-
Methods inherited from class com.xceptance.xlt.api.actions.AbstractAction
execute, executeThinkTime, getThinkTime, getThinkTimeDeviation, getTimerName, postValidate, preValidate, preValidateSafe, setThinkTime, setThinkTime, setThinkTimeDeviation, setThinkTimeDeviation, setTimerName
-
-
-
-
Constructor Detail
-
AbstractXmlPageAction
protected AbstractXmlPageAction(AbstractWebAction previousAction, java.lang.String timerName)
Creates a new AbstractXmlPageAction object and gives it the passed timer name. This constructor is typically used for an intermediate action in a sequence of actions, i.e. it has a previous action.- Parameters:
previousAction
- the action that preceded the current actiontimerName
- the name of the timer that is associated with this action
-
AbstractXmlPageAction
protected AbstractXmlPageAction(java.lang.String timerName)
Creates a new AbstractXmlPageAction object and gives it the passed timer name. This constructor is typically used for the first action in a sequence of actions, i.e. it has no previous action.- Parameters:
timerName
- the name of the timer that is associated with this action
-
-
Method Detail
-
getXmlPage
public XmlPage getXmlPage()
Returns the parsed XML page object generated by this action.- Returns:
- the page
-
loadXMLPage
protected void loadXMLPage(java.net.URL url) throws java.lang.Exception
Loads the page from the passed URL.- Parameters:
url
- the target URL- Throws:
java.lang.Exception
- if an error occurred while loading the page
-
validateHttpResponseCode
protected void validateHttpResponseCode(int expected) throws java.lang.Exception
Validates the HTTP response code.- Parameters:
expected
- the expected HTTP response code- Throws:
java.lang.Exception
- if the validation against the expected response code failed or no response is available
-
-