|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.test.MockLink
public class MockLink
Corresponds to a link in a HTML document after it has been parsed with
ParsedHtml.parse(com.uwyn.rife.test.MockResponse).
| Method Summary | |
|---|---|
MockResponse |
click()
Click this link with its current parameters and returns the response. |
String |
getClassName()
Retrieves the content of this link's class attribute. |
String |
getHref()
Retrieves the content of this link's href attribute. |
String |
getId()
Retrieves the content of this link's id attribute. |
String |
getName()
Retrieves the content of this link's name attribute. |
Node |
getNode()
Retrieves the DOM XML node that this link corresponds to. |
Collection<String> |
getParameterNames()
Retrieves all the parameter names of this link. |
Map<String,String[]> |
getParameters()
Retrieves all the parameters of this link. |
String |
getParameterValue(String name)
Retrieves the first value of a parameter in this link. |
String[] |
getParameterValues(String name)
Retrieves the values of a parameter in this link. |
MockRequest |
getRequest()
Creates a new MockRequest that contains the parameters this
link. |
String |
getTarget()
Retrieves the content of this link's target attribute. |
String |
getText()
Retrieves the text that this links surrounds. |
String |
getTitle()
Retrieves the content of this link's title attribute. |
boolean |
hasParameter(String name)
Checks whether a named parameter is present in this link. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Node getNode()
public MockRequest getRequest()
MockRequest that contains the parameters this
link.
MockRequestpublic MockResponse click()
MockResponsepublic Map<String,String[]> getParameters()
Map of the parameters with the names as the keys
and their value arrays as the valuesgetParameterNames(),
hasParameter(java.lang.String),
getParameterValue(java.lang.String),
getParameterValues(java.lang.String)public Collection<String> getParameterNames()
Collection of the parameter namesgetParameters(),
hasParameter(java.lang.String),
getParameterValue(java.lang.String),
getParameterValues(java.lang.String)public boolean hasParameter(String name)
name - the name of the parameter to check
true if the parameter is present; or
false otherwise
getParameters(),
getParameterNames(),
getParameterValue(java.lang.String),
getParameterValues(java.lang.String)public String getParameterValue(String name)
name - the name of the parameter
null if no such parameter could be found
getParameters(),
getParameterNames(),
hasParameter(java.lang.String),
getParameterValues(java.lang.String)public String[] getParameterValues(String name)
name - the name of the parameter
null if no such parameter could be found
getParameters(),
getParameterNames(),
hasParameter(java.lang.String),
getParameterValue(java.lang.String)public String getId()
id attribute.
id attribute; or
null if no such attribute could be found
public String getClassName()
class attribute.
class attribute; or
null if no such attribute could be found
public String getTitle()
title attribute.
title attribute; or
null if no such attribute could be found
public String getHref()
href attribute.
href attribute; or
null if no such attribute could be found
public String getTarget()
target attribute.
target attribute; or
null if no such attribute could be found
public String getName()
name attribute.
name attribute; or
null if no such attribute could be found
public String getText()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||