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
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
ConstructorsModifierConstructorDescriptionprotected
AbstractXmlPageAction
(AbstractWebAction previousAction, String timerName) Creates a new AbstractXmlPageAction object and gives it the passed timer name.protected
AbstractXmlPageAction
(String timerName) Creates a new AbstractXmlPageAction object and gives it the passed timer name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parsed XML page object generated by this action.protected void
loadXMLPage
(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 Details
-
AbstractXmlPageAction
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
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 Details
-
getXmlPage
Returns the parsed XML page object generated by this action.- Returns:
- the page
-
loadXMLPage
Loads the page from the passed URL.- Parameters:
url
- the target URL- Throws:
Exception
- if an error occurred while loading the page
-
validateHttpResponseCode
Validates the HTTP response code.- Parameters:
expected
- the expected HTTP response code- Throws:
Exception
- if the validation against the expected response code failed or no response is available
-