Exemple #1
0
        public void testPurchase_UK()
        {
            homePage.openUKHomePage();
            homePage.deleteCookies();
            homePage.verifyCorrectPageIsDisplayed_UK();
            homePage.browseToCategoryOnTopMenu("uk_On the Road");

            categoryPage.clickOnSubCategory("uk_Motorcycles");

            productListPage.clickProductLink("zūmo 220, MPC");

            productPage.selectProductSku("zumo 220, North America");
            productPage.clickAddToCartButton();

            cartPage.verifyCorrectPageIsDisplayed();
            cartPage.clickCheckoutButton();

            signInPage.verifyCorrectPageIsDisplayed_US_UK();
            signInPage.clickCreateNewAccountLink();

            createAccountPage.verifyCorrectPageIsDisplayed_US_UK();
            createAccountPage.addCustomerInfo_UK();

            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(true);
            createAddressPage.addAddress_UK();

            deliveryOptionsPage.verifyCorrectPageIsDisplayed();
            deliveryOptionsPage.clickContinueButton();

            billingAndReviewPage.verifyCorrectPageIsDisplayed();
            billingAndReviewPage.submitOrder();

            receiptPage.verifyCorrectPageIsDisplayed();
            receiptPage.verifyOrderNumberExists();
        }
        public void testSingleSignOn_Checkout()
        {
            homePage.openBEHomePage();
            //homePage.deleteCookies();
            homePage.openUSHomePage();
            homePage.deleteCookies();
            header.clickOnMyAccountLink_US_UK();
            signInPage.verifyCorrectPageIsDisplayed_US_UK();
            signInPage.clickCreateNewAccountLink();
            createAccountPage.verifyCorrectPageIsDisplayed_US_UK();
            createAccountPage.addCustomerInfo_US();
            manageAccountPage.clickAddAddressBtn_US_UK();
            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(false);
            createAddressPage.checkPreferredBillingAddressBox();
            createAddressPage.addAddress_US();

            homePage.openBEHomePage();
            homePage.verifyCorrectPageIsDisplayed_BE();
            homePage.browseToCategoryOnTopMenu("du_On the Road");
            categoryPage.clickOnSubCategory("du_Automotive");
            productListPage.clickProductLink("Draagtas");
            productPage.clickAddToCartButton();
            cartPage.clickCheckoutButton();
            shippingAddressPage.selectNewAddressOption();
            createAddressPage = new CreateAddressPage(customer, selenium, this);
            createAddressPage.verifyCorrectPageIsDisplayed_BE(true);
            createAddressPage.addAddress_BE();
            deliveryOptionsPage.clickContinueButton();
            billingAndReviewPage.verifyCorrectPageIsDisplayed();
            billingAndReviewPage.submitOrder();
            receiptPage.verifyCorrectPageIsDisplayed();
            receiptPage.verifyOrderNumberExists();
        }
        public void testPurchase_US()
        {
            customer = new Customer();
            homePage = new HomePage(selenium, this);
            categoryPage = new CategoryPage(selenium, this);
            productListPage = new ProductListPage(selenium, this);
            productPage = new ProductPage(selenium, this);
            cartPage = new CartPage(selenium, this);
            signInPage = new SignInPage(selenium, this);
            createAccountPage = new CreateAccountPage(selenium, this);
            createAddressPage = new CreateAddressPage(customer, selenium, this);
            deliveryOptionsPage = new DeliveryOptionsPage(selenium, this);
            billingAndReviewPage = new BillingAndReviewPage(selenium, this);
            receiptPage = new ReceiptPage(selenium, this);
            billingAddressPage = new BillingAddressPage(selenium, this);

            homePage.openUSHomePage();
            homePage.deleteCookies();
            homePage.verifyCorrectPageIsDisplayed_US();
            homePage.browseToCategoryOnTopMenu("On the Road");

            categoryPage.clickOnSubCategory("Motorcycles");

            productListPage.clickProductLink("220");

            productPage.selectProductSku("zumo 220, North America");
            productPage.clickAddToCartButton();

            cartPage.verifyCorrectPageIsDisplayed();
            cartPage.clickCheckoutButton();

            signInPage.verifyCorrectPageIsDisplayed_US_UK();
            signInPage.clickCreateNewAccountLink();

            createAccountPage.verifyCorrectPageIsDisplayed_US_UK();
            createAccountPage.addCustomerInfo_US();

            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(true);
            createAddressPage.addAddress_US();

            deliveryOptionsPage.verifyCorrectPageIsDisplayed();
            deliveryOptionsPage.clickContinueButton();

            billingAndReviewPage.verifyCorrectPageIsDisplayed();
            billingAndReviewPage.submitOrder();

            receiptPage.verifyCorrectPageIsDisplayed();
            receiptPage.verifyOrderNumberExists();
        }