|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
AjaxListener | |
Condition | |
MCP | The main class for the Mozilla Control Program. |
TimeoutHandler | This class provides a simple facility for placing a time bound on browser interactions (clicks, Ajax transactions, etc). |
Mozilla Control Program
This package is a simple layer on top of the Webclient API to enable automated testing of web applications using software such as JUnit or TestNG. It fulfills a similar role as HtmlUnit or HttpUnit, but unlike those two, MCP has a real browser behind it. MCP also fulfills a similar role as Selenium. However, unlike Selenium, MCP allows you to make assertions about the response content of actual XMLHttpRequest responses, including getting an actual DOM instance of the response XML.
The main class in the package is MCP. An
instance of MCP
corresponds to one browser window. Methods
doing the following obvious tasks are provided:
create
and show the actual browser window as a
java.awt.Frame
.
click on an element (given its id or name) and wait for the page to load before returning.
load a URL and wait for it to finish loading before returning.
add AWT mouse
and key
listeners. These can be used in conjunction with the
java.awt.Robot
class to drive the browser.
Here is a code excerpt that illustrates the use of MCP and JUnit to test a JSF application that uses Project Dynamic Faces for Ajax.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |