Class 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.
    • 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 action
        timerName - 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