HTML and CSS Reference
In-Depth Information
/** This will give us the contextPath where the web application was installed. */
URL contextPath;
/** This will give us access to a Drone that simulates a browser. */
private DefaultSelenium browser;
* The method annotated with Deployment outputs the web archive representing
* the application.The archive must contain all the resource and classes
* being tested.
* @return {@link WebArchive} containing the resources and classes
* representing the Hello You application
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "hello-you.war")
.addAsWebResource(new File("src/main/webapp/hello-you.xhtml"))
.addAsWebResource(new File("src/main/webapp/contracts/basic/base.xhtml"),
.addAsWebResource(new File("src/main/webapp/contracts/basic/cssLayout.css"),
.addAsWebResource(new File("src/main/webapp/contracts/basic/default.css"),
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"))
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
* Scenario: Entering my name.
* Given that I enter my name 'Clutch Powers' on the page
* When I press the Submit Button
* Then I will be greeted 'Hello Clutch Powers' by the application
public void helloyou_EnterName_GreetingFound() {
String startUrl = contextPath.toString() + "faces/hello-you.xhtml";
// Open the hello-you page;
// Type name in the input field
browser.type("id=hello-form:input-name", "Clutch Powers");
// Click the submit button"id=hello-form:submit");
// Wait for the page to load (max 5 seconds)
// Check that the "Hello <name>" element is displayed on screen
Search WWH ::

Custom Search