Exemplo n.º 1
0
        public override void RunTest()
        {
            header            = new Header(selenium, this);
            footer            = new Footer(selenium, this);
            homePage          = new HomePage(selenium, this);
            categoryPage      = new CategoryPage(selenium, this);
            productListPage   = new ProductListPage(selenium, this);
            productPage       = new ProductPage(selenium, this);
            signInPage        = new SignInPage(selenium, this);
            createAccountPage = new CreateAccountPage(selenium, this);
            manageAccountPage = new ManageAccountPage(selenium, this);
            customer          = createAccountPage.getCustomer();
            createAddressPage = new CreateAddressPage(customer, selenium, this);

            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.verifyCorrectPageIsDisplayed_US_UK();
            manageAccountPage.clickAddAddressBtn_US_UK();
            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(false);
            createAddressPage.checkPreferredBillingAddressBox();
            createAddressPage.addAddress_US();

            String userName = customer.getUserName();

            homePage.openBEHomePage();
            homePage.verifyDutchText();//Below was commented out because the other language pages are not up to speed with US.  Also for SSO this seems like redundancy.  Needs to test integration with MyGarmin etc for SSO (IMO)

            //header.verifyDutchText_CustomerLoggedIn(userName);

            /*
             * footer.clickFrenchLanguageLink();
             * homePage.verifyFrenchText();
             * header.verifyFrenchText_CustomerLoggedIn(userName);
             * footer.clickDutchLanguageLink();
             * homePage.verifyDutchText();
             * header.verifyDutchText_CustomerLoggedIn(userName);
             * homePage.browseToCategoryOnTopMenu("du_On the Road");
             *
             * categoryPage.verifyDutchText();
             * footer.clickFrenchLanguageLink();
             * categoryPage.verifyFrenchText();
             * footer.clickDutchLanguageLink();
             * categoryPage.verifyDutchText();
             *
             * String du_subCategory = "du_Automotive";
             * categoryPage.clickOnSubCategory(du_subCategory);
             * productListPage.verifyDutchText(du_subCategory, "Draagtas");
             *
             * footer.clickFrenchLanguageLink();
             * productListPage.verifyFrenchText("fr_Automotive", "Etui de protection");
             */
        }
Exemplo n.º 2
0
        public void testPurchase_BE()
        {
            homePage.openBEHomePage();
            homePage.deleteCookies();
            homePage.verifyCorrectPageIsDisplayed_BE();
            homePage.browseToCategoryOnTopMenu("du_On the Road");

            categoryPage.clickOnSubCategory("du_Automotive");

            productListPage.clickProductLink("Draagtas");

            productPage.clickAddToCartButton();

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

            signInPage.verifyCorrectPageIsDisplayed_BE();
            signInPage.clickCreateNewAccountLink();

            createAccountPage.verifyCorrectPageIsDisplayed_BE();
            createAccountPage.addCustomerInfo_BE();

            createAddressPage.verifyCorrectPageIsDisplayed_BE(true);
            createAddressPage.addAddress_BE();

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

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

            receiptPage.verifyCorrectPageIsDisplayed();
            receiptPage.verifyOrderNumberExists();
        }
        public override void RunTest()
        {
            header = new Header(selenium, this);
            footer = new Footer(selenium, this);
            homePage = new HomePage(selenium, this);
            categoryPage = new CategoryPage(selenium, this);
            productListPage = new ProductListPage(selenium, this);
            productPage = new ProductPage(selenium, this);
            signInPage = new SignInPage(selenium, this);
            createAccountPage = new CreateAccountPage(selenium, this);
            manageAccountPage = new ManageAccountPage(selenium, this);
            customer = createAccountPage.getCustomer();
            createAddressPage = new CreateAddressPage(customer, selenium, this);

            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.verifyCorrectPageIsDisplayed_US_UK();
            manageAccountPage.clickAddAddressBtn_US_UK();
            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(false);
            createAddressPage.checkPreferredBillingAddressBox();
            createAddressPage.addAddress_US();

            String userName = customer.getUserName();

            homePage.openBEHomePage();
            homePage.verifyDutchText();//Below was commented out because the other language pages are not up to speed with US.  Also for SSO this seems like redundancy.  Needs to test integration with MyGarmin etc for SSO (IMO)

            //header.verifyDutchText_CustomerLoggedIn(userName);
            /*
            footer.clickFrenchLanguageLink();
            homePage.verifyFrenchText();
            header.verifyFrenchText_CustomerLoggedIn(userName);
            footer.clickDutchLanguageLink();
            homePage.verifyDutchText();
            header.verifyDutchText_CustomerLoggedIn(userName);
            homePage.browseToCategoryOnTopMenu("du_On the Road");

            categoryPage.verifyDutchText();
            footer.clickFrenchLanguageLink();
            categoryPage.verifyFrenchText();
            footer.clickDutchLanguageLink();
            categoryPage.verifyDutchText();

            String du_subCategory = "du_Automotive";
            categoryPage.clickOnSubCategory(du_subCategory);
            productListPage.verifyDutchText(du_subCategory, "Draagtas");

            footer.clickFrenchLanguageLink();
            productListPage.verifyFrenchText("fr_Automotive", "Etui de protection");
            */
        }
        public void testSingleSignOn_AddAddress()
        {
            homePage.openUKHomePage();
            //homePage.deleteCookies();
            homePage.openUSHomePage();
            //homePage.deleteCookies();
            homePage.verifyCorrectPageIsDisplayed_US();
            header.clickOnMyAccountLink_US_UK();
            signInPage.verifyCorrectPageIsDisplayed_US_UK();
            signInPage.clickCreateNewAccountLink();
            createAccountPage.verifyCorrectPageIsDisplayed_US_UK();
            createAccountPage.addCustomerInfo_US();
            manageAccountPage.verifyCorrectPageIsDisplayed_US_UK();
            manageAccountPage.clickAddAddressBtn_US_UK();
            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(false);
            createAddressPage.checkPreferredBillingAddressBox();
            createAddressPage.addAddress_US();

            String userName = customer.getUserName();

            homePage.openUKHomePage();
            createAccountPage.setCustomerInfo_UK();
            header.clickOnUserNameLink_US_UK(userName);
            manageAccountPage.clickAddAddressBtn_US_UK();
            createAddressPage = new CreateAddressPage(customer, selenium, this);
            createAddressPage.verifyCorrectPageIsDisplayed_US_UK(false);
            createAddressPage.addAddress_UK();
            homePage.openBEHomePage();
            homePage.verifyCorrectPageIsDisplayed_BE();
            createAccountPage.setCustomerInfo_BE();
            header.clickOnUserNameLink_BE(userName);
            manageAccountPage.clickAddAddressBtn_BE();
            createAddressPage = new CreateAddressPage(customer, selenium, this);
            createAddressPage.verifyCorrectPageIsDisplayed_BE(false);
            createAddressPage.addAddress_BE();
        }
Exemplo n.º 5
0
        public void testBrowseStore_BE()
        {
            homePage.openBEHomePage();
            homePage.deleteCookies();
            selenium.Select("languageSelect", "United Kingdom - English");
            homePage.verifyCorrectPageIsDisplayed_BE();
            homePage.browseToCategoryOnTopMenu("du_On the Road");

            categoryPage.verifyCorrectPageIsDisplayed(categoryPage.subCategories_duOnTheRoad);

            homePage.browseToCategoryOnTopMenu("fr_Maps");
            categoryPage.verifyNoSubCategoryExists();

            homePage.browseToCategoryOnTopMenu("du_Into Sport");
            String[] subCategories_duIntoSport = { "du_Running", "du_Cycling", "du_Golfing" };
            categoryPage.verifyCorrectPageIsDisplayed(subCategories_duIntoSport);

            homePage.browseToCategoryOnTopMenu("du_On the Road");
            categoryPage.verifyCorrectPageIsDisplayed(categoryPage.subCategories_duOnTheRoad);
            categoryPage.clickOnSubCategory("du_Automotive");
            productListPage.verifyCorrectPageIsDisplayed();
            productListPage.verifyCurrency_BE();
            // productListPage.verifyShopByPriceFilter1("< €80");
            //  productListPage.verifyShopByPriceFilter2("€160 - 240");
            //  productListPage.verifyShopByBrandFilter1("du_Nuvi");
            productListPage.verifyShopByBrandFilter2("du_Prestige Series");
            productListPage.verifyShopByBrandFilter3("du_Essential Series");
            productListPage.verifyShopByBrandFilter4("du_Zumo");
            productListPage.verifyShopByBrandFilter5("du_Advanced Series");

            productListPage.clickProductLink("Draagtas");

            productPage.verifyCorrectPageIsDisplayed();
            productPage.verifyCurrency_BE();

            homePage.browseToCategoryOnTopMenu("du_On the Road");
            categoryPage.clickOnSubCategory("du_Motorcycles");
            //  productListPage.verifyShopByPriceFilter1("> €240");
            productListPage.verifyShopByBrandFilter1("du_Prestige Series");
        }
        public void testRegisterUser_BE()
        {
            homePage.openBEHomePage();
            homePage.deleteCookies();
            homePage.verifyCorrectPageIsDisplayed_BE();
            customer.setUserName("test_" + System.DateTime.Now.TimeOfDay.TotalMinutes);
            header.clickOnMyAccountLink_BE();

            signInPage.verifyCorrectPageIsDisplayed_BE();
            signInPage.clickCreateNewAccountLink();

            createAccountPage.verifyCorrectPageIsDisplayed_BE();
            createAccountPage.addCustomerInfo_BE();

            manageAccountPage.verifyCorrectPageIsDisplayed_BE();
            manageAccountPage.clickAddAddressBtn_BE();

            createAddressPage.verifyCorrectPageIsDisplayed_BE(false);
            createAddressPage.addAddress_BE();

            manageAccountPage.verifyMyAddressBook(customer.getAddressList());
        }
Exemplo n.º 7
0
        public override void RunTest()
        {
            header          = new Header(selenium, this);
            footer          = new Footer(selenium, this);
            homePage        = new HomePage(selenium, this);
            categoryPage    = new CategoryPage(selenium, this);
            productListPage = new ProductListPage(selenium, this);
            productPage     = new ProductPage(selenium, this);

            homePage.openBEHomePage();
            //homePage.deleteCookies();
            homePage.verifyDutchText();
            header.verifyDutchText_CustomerNotLoggedIn();
            footer.clickFrenchLanguageLink();
            homePage.verifyFrenchText();
            header.verifyFrenchText_CustomerNotLoggedIn();
            footer.clickDutchLanguageLink();
            homePage.verifyDutchText();
            header.verifyDutchText_CustomerNotLoggedIn();
            //homePage.browseToCategoryOnTopMenu("du_On the Road");
            //driver.UnderlyingWebDriver.FindElement(By.TagName("Producten")).Click();
            categoryPage.verifyDutchText();
            footer.clickFrenchLanguageLink();
            categoryPage.verifyFrenchText();
            footer.clickDutchLanguageLink();
            categoryPage.verifyDutchText();

            string du_subCategory = "Autonavigatie";

            //driver.UnderlyingWebDriver.FindElement(By.  .ClassName("Producten")).Click();
            //driver.UnderlyingWebDriver.FindElement(By.TagName("Producten")).Click();
            //categoryPage.clickOnSubCategory(du_subCategory);
            //productListPage.verifyDutchText(du_subCategory, "Draagtas");

            footer.clickFrenchLanguageLink();
            productListPage.verifyFrenchText("fr_Automotive", "Etui de protection");
        }
Exemplo n.º 8
0
        public override void RunTest()
        {
            header = new Header(selenium, this);
            footer = new Footer(selenium, this);
            homePage = new HomePage(selenium, this);
            categoryPage = new CategoryPage(selenium, this);
            productListPage = new ProductListPage(selenium, this);
            productPage = new ProductPage(selenium, this);

            homePage.openBEHomePage();
            //homePage.deleteCookies();
            homePage.verifyDutchText();
            header.verifyDutchText_CustomerNotLoggedIn();
            footer.clickFrenchLanguageLink();
            homePage.verifyFrenchText();
            header.verifyFrenchText_CustomerNotLoggedIn();
            footer.clickDutchLanguageLink();
            homePage.verifyDutchText();
            header.verifyDutchText_CustomerNotLoggedIn();
            //homePage.browseToCategoryOnTopMenu("du_On the Road");
            //driver.UnderlyingWebDriver.FindElement(By.TagName("Producten")).Click();
            categoryPage.verifyDutchText();
            footer.clickFrenchLanguageLink();
            categoryPage.verifyFrenchText();
            footer.clickDutchLanguageLink();
            categoryPage.verifyDutchText();

            string du_subCategory = "Autonavigatie";
            //driver.UnderlyingWebDriver.FindElement(By.  .ClassName("Producten")).Click();
            //driver.UnderlyingWebDriver.FindElement(By.TagName("Producten")).Click();
            //categoryPage.clickOnSubCategory(du_subCategory);
            //productListPage.verifyDutchText(du_subCategory, "Draagtas");

            footer.clickFrenchLanguageLink();
            productListPage.verifyFrenchText("fr_Automotive", "Etui de protection");
        }