|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.meterware.httpunit.ParameterHolder com.meterware.httpunit.WebRequestSource
Base class for objects which can be clicked to generate new web requests.
Method Summary | |
protected abstract void |
addPresetParameter(java.lang.String name,
java.lang.String value)
Records a parameter defined by including it in the destination URL. |
boolean |
doEvent(java.lang.String eventScript)
Deprecated. since 1.7 - use doEventScript instead |
boolean |
doEventScript(java.lang.String eventScript)
optional do the event if it's defined |
java.lang.String |
getAttribute(java.lang.String name)
get the attribute value for the given name |
protected WebResponse |
getBaseResponse()
Returns the web response containing this request source. |
protected java.net.URL |
getBaseURL()
|
java.lang.String |
getClassName()
Returns the class associated with this request source. |
protected WebResponse |
getCurrentFrameContents()
|
protected java.lang.String |
getDestination()
|
org.w3c.dom.Node |
getDOMSubtree()
Returns a copy of the domain object model subtree associated with this entity. |
protected org.w3c.dom.Element |
getElement()
Returns the actual DOM for this request source, not a copy. |
protected abstract java.lang.String |
getEmptyParameterValue()
|
java.lang.String |
getFragmentIdentifier()
Returns the fragment identifier for this request source, used to identifier an element within an HTML document. |
FrameSelector |
getFrame()
Returns the frame containing this request source. |
protected HTMLPage |
getHTMLPage()
Returns the HTMLPage associated with this request source. |
java.lang.String |
getID()
Returns the ID associated with this request source. |
java.lang.String |
getName()
Returns the name associated with this request source. |
org.w3c.dom.Node |
getNode()
Returns the DOM node underlying this element. |
java.lang.String |
getPageFrame()
Deprecated. as of 1.6, use #getFrame |
abstract java.lang.String[] |
getParameterNames()
Returns an array containing the names of any parameters to be sent on a request based on this request source. |
abstract java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the values of the named parameter. |
ScriptableDelegate |
getParentDelegate()
Returns the scriptable delegate which can provide the scriptable delegate for this element. |
protected java.lang.String |
getRelativeURL()
get the relative URL for a weblink change spaces to %20 |
abstract WebRequest |
getRequest()
Creates and returns a web request from this request source. |
ScriptingHandler |
getScriptingHandler()
Returns the scriptable delegate. |
java.lang.String |
getTagName()
Returns the tag name of this node. |
java.lang.String |
getTarget()
Returns the target for this request source. |
java.lang.String |
getText()
Returns the text value of this block. |
java.lang.String |
getTitle()
Returns the title associated with this request source. |
boolean |
handleEvent(java.lang.String eventName)
handle the event with the given name by getting the attribute and then executing the eventScript for it |
boolean |
isSupportedAttribute(java.lang.String name)
Returns true if this element may have an attribute with the specified name. |
protected void |
loadDestinationParameters()
Extracts any parameters specified as part of the destination URL, calling addPresetParameter for each one in the order in which they are found. |
void |
removeAttribute(java.lang.String name)
remove the given attribute |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
set the attribute with the given name to the given value |
protected void |
setDestination(java.lang.String destination)
|
protected void |
setTargetAttribute(java.lang.String value)
|
protected WebResponse |
submitRequest(java.lang.String event,
WebRequest request)
submit the given event for the given request |
protected WebResponse |
submitRequest(WebRequest request)
Submits a request to the web client from which this request source was originally obtained. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.meterware.httpunit.HTMLElement |
newScriptable |
Methods inherited from interface com.meterware.httpunit.protocol.ParameterCollection |
recordParameters |
Method Detail |
public java.lang.String getID()
getID
in interface HTMLElement
public java.lang.String getClassName()
getClassName
in interface HTMLElement
public java.lang.String getName()
getName
in interface HTMLElement
public java.lang.String getTitle()
getTitle
in interface HTMLElement
public java.lang.String getTarget()
public java.lang.String getPageFrame()
public FrameSelector getFrame()
public java.lang.String getFragmentIdentifier()
public org.w3c.dom.Node getDOMSubtree()
public abstract WebRequest getRequest()
public abstract java.lang.String[] getParameterNames()
public abstract java.lang.String[] getParameterValues(java.lang.String name)
protected java.lang.String getRelativeURL()
protected java.net.URL getBaseURL()
protected java.lang.String getDestination()
protected void setDestination(java.lang.String destination)
protected org.w3c.dom.Element getElement()
protected HTMLPage getHTMLPage() throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected final void loadDestinationParameters()
protected WebResponse submitRequest(java.lang.String event, WebRequest request) throws java.io.IOException, org.xml.sax.SAXException
event
- request
-
java.io.IOException
org.xml.sax.SAXException
public boolean doEvent(java.lang.String eventScript)
doEvent
in interface ScriptingEventHandler
eventScript
- - the script to use
public boolean doEventScript(java.lang.String eventScript)
doEventScript
in interface ScriptingEventHandler
eventScript
- - the script to handle
public boolean handleEvent(java.lang.String eventName)
ScriptingEventHandler
handleEvent
in interface ScriptingEventHandler
eventName
-
protected WebResponse getCurrentFrameContents()
protected final WebResponse submitRequest(WebRequest request) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
protected final WebResponse getBaseResponse()
protected abstract void addPresetParameter(java.lang.String name, java.lang.String value)
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface HTMLElement
name
- - the name of the attribute to getpublic void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface HTMLElement
name
- - the name of the attributevalue
- - the value to usepublic void removeAttribute(java.lang.String name)
removeAttribute
in interface HTMLElement
name
- - the name of the attribute to removepublic boolean isSupportedAttribute(java.lang.String name)
HTMLElement
isSupportedAttribute
in interface HTMLElement
public org.w3c.dom.Node getNode()
HTMLElement
getNode
in interface HTMLElement
public java.lang.String getText()
getText
in interface HTMLElement
public java.lang.String getTagName()
HTMLElement
getTagName
in interface HTMLElement
protected void setTargetAttribute(java.lang.String value)
protected abstract java.lang.String getEmptyParameterValue()
public ScriptingHandler getScriptingHandler()
getScriptingHandler
in interface HTMLElement
public ScriptableDelegate getParentDelegate()
HTMLElement
getParentDelegate
in interface HTMLElement
|
Copyright © 2000-2008 Russell Gold. See license agreement for rights granted. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |