com.canoo.webtest.steps.request
Class InvokePage

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.canoo.webtest.steps.Step
              extended by com.canoo.webtest.steps.AbstractBrowserAction
                  extended by com.canoo.webtest.steps.request.AbstractTargetAction
                      extended by com.canoo.webtest.steps.request.InvokePage
All Implemented Interfaces:
IBrowserAction, Serializable, Cloneable

public class InvokePage
extends AbstractTargetAction

Performs an initial request to an url and makes the received response available for subsequent steps.

The url may be specified as an absolute url (with protocol) that will be used directly or as the end part of an url. In this case the protocol, host, port and basepath properties of the <config> step will be used to build a complete url.

Author:
unknown, Marc Guillemot, Paul King
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.canoo.webtest.steps.Step
DEFAULT_DESCRIPTION, ELEMENT_ATTRIBUTE_ID, ELEMENT_ATTRIBUTE_NAME, PROPERTY_TYPE_ANT, PROPERTY_TYPE_ANT_STRICT, PROPERTY_TYPE_DEFAULT, PROPERTY_TYPE_DYNAMIC
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
InvokePage()
           
 
Method Summary
protected  void addComputedParameters(Map map)
          Adds the computed url if only a part was specified (nice to have in reports)
 void addText(String txt)
          Alternative to set the content of a SOAP message.
protected  com.gargoylesoftware.htmlunit.Page findTarget()
          Fetch the target URL specified byu the step.
 String getContent()
           
 File getContentFile()
           
protected  String getLogMessageForTarget()
           
 String getMethod()
           
 String getSoapAction()
           
 String getUrl()
           
 void setContent(String content)
          Sets the request content.
 void setContentFile(File contentFile)
          Sets the filename of the request contents.
 void setMethod(String method)
          Sets the HTTP Method.
 void setSoapAction(String soapAction)
          Sets the SOAP action.
 void setUrl(String newUrl)
          Sets the url.
protected  void verifyParameters()
          Called to let the step's implementation validate its parameters.
 
Methods inherited from class com.canoo.webtest.steps.request.AbstractTargetAction
doExecute, getPassword, getResponse, getSave, getUsername, setPassword, setUsername
 
Methods inherited from class com.canoo.webtest.steps.AbstractBrowserAction
setSave, setSavePrefix, setSaveResponse
 
Methods inherited from class com.canoo.webtest.steps.Step
clone, emptyParamCheck, execute, getComputedParameters, getContext, getDefaultPropertyType, getDescription, getDuration, getParameterDictionary, getStepLabel, getVerifier, getWebtestProperties, getWebtestProperties, getWebtestProperty, getWebtestProperty, handleException, hasDescription, integerParamCheck, isCompleted, isPerformingAction, isStarted, isSuccessful, notifyCompleted, notifyStarted, notifyStepResultsListeners, notifySuccess, nullParamCheck, nullResponseCheck, optionalIntegerParamCheck, paramCheck, positiveOrZeroParamCheck, setStepid, setWebtestProperty, setWebtestProperty, toString
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.canoo.webtest.interfaces.IBrowserAction
getTaskName
 

Constructor Detail

InvokePage

public InvokePage()
Method Detail

getMethod

public String getMethod()

getUrl

public String getUrl()

addText

public void addText(String txt)
Alternative to set the content of a SOAP message.

Parameters:
txt - the content

setUrl

public void setUrl(String newUrl)
Sets the url.

Parameters:
newUrl - the relative or absolute url

setMethod

public void setMethod(String method)
Sets the HTTP Method.

Parameters:
method -

getContentFile

public File getContentFile()

setContentFile

public void setContentFile(File contentFile)
Sets the filename of the request contents.

Parameters:
contentFile -

getContent

public String getContent()

setContent

public void setContent(String content)
Sets the request content.

Parameters:
content -

getSoapAction

public String getSoapAction()

setSoapAction

public void setSoapAction(String soapAction)
Sets the SOAP action.

Parameters:
soapAction -

verifyParameters

protected void verifyParameters()
Description copied from class: Step
Called to let the step's implementation validate its parameters. The method is called after parameter extensions but before Step.doExecute(). This implementation does nothing, overwrite as needed.

Overrides:
verifyParameters in class Step

findTarget

protected com.gargoylesoftware.htmlunit.Page findTarget()
                                                 throws IOException,
                                                        SAXException
Description copied from class: AbstractTargetAction
Fetch the target URL specified byu the step.

Specified by:
findTarget in class AbstractTargetAction
Returns:
A new Page for the target URL.
Throws:
IOException
SAXException

getLogMessageForTarget

protected String getLogMessageForTarget()
Specified by:
getLogMessageForTarget in class AbstractTargetAction

addComputedParameters

protected void addComputedParameters(Map map)
Adds the computed url if only a part was specified (nice to have in reports)

Overrides:
addComputedParameters in class Step
Parameters:
map - the map in which the parameters should be added

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.