|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.jsfunit.jsfsession.JSFClientSession
public class JSFClientSession
This class provides a wrapper for HtmlUnit that imitates browser interaction with a JSF application.
Method Summary | |
---|---|
void |
click(String componentID)
Click a JSF component. |
com.gargoylesoftware.htmlunit.Page |
getContentPage()
Get the latest content page returned from the server. |
Element |
getElement(String componentID)
Get a DOM Element on the current page that has the given JSF componentID. |
String |
getPageAsText()
Get the content page as a text String. |
void |
setValue(String componentID,
String value)
Set the value attribute of a JSF component. |
void |
type(String componentID,
char c)
Simulates typing a character while this JSF component has focus. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public com.gargoylesoftware.htmlunit.Page getContentPage()
public String getPageAsText()
public Element getElement(String componentID)
componentID
- The JSF component id (or a suffix of the client ID)
null
if not found.
DuplicateClientIDException
- if more than one client ID matches the suffix
ClassCastException
- if the current page is not an HtmlPage.public void setValue(String componentID, String value)
componentID
- The JSF component id (or a suffix of the client ID) of
a component rendered as an HtmlInput component.
ComponentIDNotFoundException
- if no client ID matches the suffix
DuplicateClientIDException
- if more than one client ID matches the suffix
ClassCastException
- if the current page is not an HtmlPage or the
specified component is not an HtmlInput.public void type(String componentID, char c) throws IOException
componentID
- The JSF component id (or a suffix of the client ID) of
a component rendered as an HtmlElement.
ComponentIDNotFoundException
- if no client ID matches the suffix
DuplicateClientIDException
- if more than one client ID matches the suffix
ClassCastException
- if the current page is not an HtmlPage or the
specified component is not an HtmlElement.
IOExceptioin
- if typing causes a failed request to the server.
IOException
public void click(String componentID) throws IOException
componentID
- The JSF component id (or a suffix of the client ID) to be clicked.
ComponentIDNotFoundException
- if no client ID matches the suffix
DuplicateClientIDException
- if more than one client ID matches the suffix
ClassCastException
- if the current page is not an HtmlPage or the
specified component is not an HtmlElement.
IOException
- if clicking causes a failed request to the server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |