HTML and CSS Reference
In-Depth Information
// Check that the name entered is the one expected
assertEquals("Welcome message missing",
"Hello Clutch Powers");
* Scenario: I enter the page.
* Given that I enter page
* When I do nothing
* Then I there will be no greeting displayed
public void helloyou_OpenPage_GreetingHidden() {
String startUrl = contextPath.toString() + "faces/hello-you.xhtml";
// Open the hello-you page;
// Check that the "Hello <name>" element is NOT displayed on the screen
The DefaultSelenium Drone is capable of simulating many kinds of browser interactions. A sample of interesting
methods are highlighted in Table 11-7 .
Table 11-7. Sample of DefaultSelenium Methods Used for Simulating User Interaction
attachFile(fieldLocator, fileLocation)
Used for attaching files in a file input form field
Clicks a given element with the specified locator
Double clicks a given element with the specified locator
dragAndDrop(locator, movements)
Simulates a drag and drop from a source to a location
Gets the text in a given element
Determines if a given element is visible on the screen
Opens a given page
typeKeys(location, value)
Types a value into a given input field
Waits a given number of milliseconds for the page to load
In this chapter we explored design considerations for developing JSF applications such as security, performance,
and memory consumption. We also looked at how to use the <f:ajax /> tag to Ajaxifying JSF applications. Using
the <f:ajax /> tag it is possible to set up Ajax requests on individual as well as a group of JSF components. To
supplement the <f:ajax /> tag we went behind the scenes to explore the JSF JavaScript API. Lastly we looked
at testing JSF applications using the Aqullian testing framework coupled with the Drone extension that enables
functional testing of the JSF applications.
Search WWH ::

Custom Search