// Add the item to the cart
resp = resp.getLinkWith(Util.getBundle("view", "buttonAddToCart")).click();
// Make sure item is in the cart
// Check the first two rows of the table
WebTable itemTable = resp.getTableStartingWith(Util.getBundle("view", "itemIdLabel")); // "Item ID"
itemTable.purgeEmptyCells();
String[][] table = itemTable.asText();
assertEquals( "EST-4", table[1][0].trim());
// proceed to checkout
resp = resp.getLinkWith(Util.getBundle("view", "buttonProceedToCheckout")).click(); // "Proceed to Checkout"
// Make sure it says Checkout Summary
assertTrue(resp.getText().contains(Util.getBundle("view", "checkoutSummaryLabel"))); // "Checkout Summary"
// Now click continue
resp = resp.getLinkWith(Util.getBundle("view", "buttonContinue")).click(); // "Continue >>"
// Sign in
WebForm form = resp.getForms()[1];
form.setParameter( "j_username", "beehive" );
form.setParameter( "j_password", "beehive" );
resp = form.submit();
// Enter the Checkout Info
form = resp.getForms()[1];
form.setParameter( "wlw-select_key:{actionForm.order.cardType}", "American Express" );
form.setParameter( "{actionForm.order.creditCard}", "1234" );
form.setParameter( "{actionForm.order.exprDate}", "09-2000" );
form.setParameter( "wlw-radio_button_group_key:{actionForm.order.billingAddress}", "1" );
form.setParameter( "wlw-radio_button_group_key:{actionForm.order.shippingAddress}", "1" );
resp = form.submit();
// Make sure it took
assertTrue(resp.getText().contains(Util.getBundle("view", "confirmMessage"))); // "Please confirm the information below and then press continue..."
itemTable = resp.getTableWithID("orderTable");
itemTable.purgeEmptyCells();
table = itemTable.asText();
assertEquals( "American Express", table[1][1].trim());
assertEquals( "1234", table[2][1].trim());
assertEquals( "09-2000", table[3][1].trim());
// Click Continue