Feature: Go to the Amazon web site, search for Harry Porter in the book section. Find Harry Potter and the Chamber of Secrets (book2) and then add it to the cart. Background: Establish the test settings for the test Given the following settings: | url | http://www.amazon.com | | platform | Vista | | browser | firefox | | browser version | 23 | Scenario: Verify that we have an empty cart on the amazon home page Given I am ON the "HomePage" Then I should EXPECT | cartCount | 0 | Scenario: Search for Harry Porter from the books category Given I am ON "HomePage" And I click "allButton" And I select | selectCategory | Books | And I enter | searchField | Harry Potter | And I click "go" And I wait 5 seconds Then I should be ON the "SearchResultsPage" Scenario: From the Search Results Page, verify the first result Special Edition Harry Potter Paperback Box Set Given I am ON "SearchResultsPage" Then I should EXPECT | firstResult | Special Edition Harry Potter Paperback Box Set | | chamberOfSecretsBook2 | visible | Scenario: Click on the Chamber Of Secrets Book2 to reveal the details Given I am ON "SearchResultsPage" And I CLICK "chamberOfSecretsBook2" Then I should be ON the "BookDetailPage" Scenario: Verify the details Given I am ON the "BookDetailPage" Then I should EXPECT | kindlePrice | $7.99 | | hardcoverPrice | $13.94 | | paperbackPrice | $8.56 | Scenario: Add the book to my cart Given I am ON the "BookDetailPage" And I click "hardcover" And I click "addToCart" Then I should be ON the "PreCheckoutPage" Scenario: On the pre-checkout page, verify the details Given I am ON the "PreCheckoutPage" Then I should EXPECT | orderSubtotal | 13.94 | | cartCount | 1 | Scenario: proceed to checkout Given I am ON the "PreCheckoutPage" And I click "proceedToCheckout" Then I should be ON the "SignInPage" The test script should be extremely easy to read and understand, right? |