Exemplo n.º 1
0
 //WS_1118
 public void Checkout_ShippingValidateFullNamePT1_WS_1118()
 {
     if (false)
     {
         Assert.Ignore();
     }
     else
     {
         string           name = "Foot Locker", deliver = "email";
         GoToMallHomePage mallPage     = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem();
         CompanyGiftCard  giftCardPage = mallPage.SearchCompany(name).SelectCompany();
         Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount");
         giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount();
         Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available");
         CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart();
         Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart");
         CheckOutPage checkout = cartPage.ClickCheckOut();
         checkout.FillName("A")
         .FillLastName("A")
         .FillAddress("123 Test");
         Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgFirstName(),
                         "The Error Message is not present or show");
         Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgLastName(),
                         "The Error Message is not present or show");
     }
 }
Exemplo n.º 2
0
 public Application()
 {
     driver             = new ChromeDriver();
     checkOutPage       = new CheckOutPage(driver);
     productListingPage = new ProductListingPage(driver);
     productDetailsPage = new ProductDetailsPage(driver);
 }
Exemplo n.º 3
0
 public void CheckOut_NoAddresValidation_WS_1306()
 {
     if (false)
     {
         Assert.Ignore();
     }
     else
     {
         GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall();
         mallPage.CheckOptionPurchaseType("Email (Instant)");
         CompanyGiftCard giftCard = mallPage.SearchCompany("Buffalo").SelectCompany();
         CheckOutPage    checkout =
             giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart().ClickCheckOut().ClickNext();
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgFirstName(),
                         "Error msg is not show or incorrect in first name");
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgLastName(),
                         "Error msg is not show or incorrect in last name");
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgAddress(),
                         "Error msg is not show or incorrect in Address");
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgCity(),
                         "Error msg is not show or incorrect in city");
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgZip(),
                         "Error msg is not show or incorrect in Zip code");
         Assert.AreEqual("This field is required.", checkout.GetErrorMsgPhone(),
                         "Error msg is not show or incorrect in phone number");
     }
 }
Exemplo n.º 4
0
        public void TC1()
        {
            ProductPage productPage = new ProductPage(WebDriver);

            //Verifying the product Name
            Assert.AreEqual(DataAccess.getParameterValue("ExpectedProductName"), productPage.ProductTitle.Text);
            //Verifying the product price
            Assert.AreEqual(DataAccess.getParameterValue("ProductValue"), productPage.Price.Text);
            //Increase the quantity to 7
            productPage.ProductQuantity.Clear();
            productPage.ProductQuantity.SendKeys("7");
            //Click on add button
            productPage.AddToCardButton.Click();
            //Verify if is added
            productPage = new ProductPage(WebDriver);
            Assert.AreEqual(DataAccess.getParameterValue("CartProductQuantity"), productPage.CartQuantity.Text);
            productPage.CartCheckout.Click();
            //Go to CheckOut
            CheckOutPage checkOutPage = new CheckOutPage(WebDriver);

            //Verify if the product is present
            Assert.AreEqual(DataAccess.getParameterValue("ExpectedProductName"), checkOutPage.productName.Text);
            //Verify if the amount is the expected
            Assert.AreEqual(DataAccess.getParameterValue("TotalAmount"), checkOutPage.TotalAmount.Text);
        }
Exemplo n.º 5
0
 //WS_1120
 public void Checkout_ShippingValidateFullNamePT2_WS_1120()
 {
     if (!DataParser.ReturnExecution("WS_1120"))
     {
         Assert.Ignore();
     }
     else
     {
         string           name = "Foot Locker", deliver = "email";
         GoToMallHomePage mallPage     = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem();
         CompanyGiftCard  giftCardPage = mallPage.SearchCompany(name).SelectCompany();
         Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount");
         giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount();
         Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available");
         CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart();
         Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart");
         CheckOutPage checkout = cartPage.ClickCheckOut();
         //SCENARIO B
         checkout.FillName("Test")
         .FillLastName("Test")
         .FillAddress("123 Test Street")
         .FillCity("Test")
         .FillZipCode("11101")
         .FillPhoneNumber("111 111 1111")
         .ClickNext();
         Assert.IsTrue(checkout.IsPaymentOptionAvailable(), "Payment option is not available");
     }
 }
Exemplo n.º 6
0
 public CheckOutViewModel(CheckOutPage currentPage)
 {
     CurrentPage        = currentPage;
     SelectedPaymentId  = Guid.Empty;
     SelectedShippingId = Guid.Empty;
     PaymentMethods     = new List <PaymentMethodDto.PaymentMethodRow>();
     ShippingMethods    = new List <ShippingMethodDto.ShippingMethodRow>();
 }
Exemplo n.º 7
0
 public static CheckOutPage ClickOnButtonContinue(CheckOutPage page)
 {
     while (page.Continue.Displayed && page.Continue.Enabled)
     {
         page.Continue.Click();
     }
     return(page);
 }
Exemplo n.º 8
0
        public void GivenIFillFollowingPersonalDetails(Table table)
        {
            dynamic      data         = table.CreateDynamicInstance();
            CheckOutPage checkoutpage = new CheckOutPage();

            checkoutpage.checkout_checkoutButton();
            checkoutpage.checkout_filldifferentInfor(data.firstname, data.lastname, data.zip);
            checkoutpage.checkout_clickContiuneButton();
        }
        public void TestShopQARS()
        {
            HomePage home = new HomePage(this.driver);

            home.GoToPage();
            RegistrationPage register = home.ClickOnRegisterLink();

            home = register.PressRegisterBtn();

            if (home.SucessfulRegistration != null)
            {
                TestContext.WriteLine("User registered successfuly");
            }
            else
            {
                TestContext.WriteLine("User isn't registered");
            }

            home.GoToPage();
            LoginPage login = home.ClickOnLogIn();

            home = login.FillLoginData("tamara1979", "Smiljka1979");

            if (home.WelcomeBack != null)
            {
                TestContext.WriteLine("Successful login");
                home = home.AddToCart();
                TestContext.WriteLine("Selected items are added to shoping cart successfully.");
                CartPage cart = home.ClickOnCartLink();
                TestContext.WriteLine("View shoping cart from Home Page is valid link");

                CheckOutPage checkout = cart.ClickOnCheckOut();

                double CheckTotal  = checkout.TotalAmount;
                int    checkNumber = checkout.OrderNumber;

                History historyTable = checkout.ClickOnOrderHistory();

                double historyTotal    = historyTable.orderAmount;
                int    historyOrderNum = historyTable.orderNum;

                if ((CheckTotal == historyTotal) && (checkNumber == historyOrderNum))
                {
                    TestContext.WriteLine("Amount and order number are equal on  checkout and history page.");
                    Assert.Pass();
                }
                else
                {
                    TestContext.WriteLine("Amount and order number aren't equal on  checkout and history page.");
                    Assert.Fail();
                }
            }
            else
            {
                TestContext.WriteLine("Unsuccessful login");
            }
        }
Exemplo n.º 10
0
 public void Cart_BackToMall_WS_1356()
 {
     if (false)
     {
         Assert.Ignore();
     }
     else
     {
         CheckOutPage     checkout = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToCart();
         GoToMallHomePage mall     = checkout.ClickBackToMall();
         Assert.AreEqual(url + "mall#/", mall.GetCurrentUrl(), "You are not stand in the mall page");
     }
 }
Exemplo n.º 11
0
        public void WhenIChooseOneMoreItems()
        {
            HomePage homePage = new HomePage();

            homePage.CustomerBuyingOneMoreItems();

            CheckOutPage checkoutpage = new CheckOutPage();

            checkoutpage.Checkout_Continue();

            OverViewPage overviewpage = new OverViewPage();

            overviewpage.Action_finish();
        }
Exemplo n.º 12
0
        public void WhenIChooseOneOfTheGoods()
        {
            HomePage homePage = new HomePage();

            homePage.HomePageActionWithAdditem();

            CheckOutPage checkoutpage = new CheckOutPage();

            checkoutpage.Checkout_Continue();

            OverViewPage overviewpage = new OverViewPage();

            overviewpage.Action_finish();
        }
Exemplo n.º 13
0
 public void CheckOut_WrongZip_WS_1307()
 {
     if (!DataParser.ReturnExecution("WS_1307"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1307.xml";
         string company            = RedeemData.GetRedeemCompany(_file),
                firstname          = RedeemData.GetRedeemFirstName(_file),
                secondname         = RedeemData.GetRedeemSecondName(_file),
                address            = RedeemData.GetRedeemAddress(_file),
                city               = RedeemData.GetRedeemCity(_file),
                zip                = RedeemData.GetRedeemZip(_file),
                phone              = RedeemData.GetRedeemPhone(_file),
                state              = RedeemData.GetRedeemState(_file);
         GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall();
         mallPage.CheckOptionPurchaseType("Email (Instant)");
         CompanyGiftCard giftCard = mallPage.SearchCompany("Buffalo").SelectCompany();
         CheckOutPage    checkout = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart().ClickCheckOut();
         checkout.FillName(firstname)
         .FillLastName(secondname)
         .FillAddress(address)
         .FillCity(city)
         .SelectState(state)
         .FillZipCode(zip)
         .FillPhoneNumber(phone);
         Assert.IsFalse(checkout.CannotEditEmail(), "Email txt field is editable");
         checkout.ClickNext();
         Assert.AreEqual("We got you covered Work Stride", checkout.GetNoCreditCardUseMsg(),
                         "The message is wrong or its possible to use the credit card");
         Assert.AreEqual("Your rewards have covered your balance.\r\nEnjoy your gift.",
                         checkout.GetNoCreditCardUseMsgSubtitle(),
                         "The message is wrong or its possible to use the credit card");
         checkout.ClickNextPayment().ClickCheckOut();
         // BUG not showing error msg
     }
 }
Exemplo n.º 14
0
        public void userBuyProductSuccessful(string test, string username, string password)
        {
            LoginPage    loginpage    = new LoginPage();
            HomePage     homepage     = new HomePage();
            CheckOutPage checkoutpage = new CheckOutPage();
            OverViewPage overviewpage = new OverViewPage();
            screenshot   screens      = new screenshot();

            loginpage.ParameterisedLoginData(username, password);
            screens.Takescreenshot9("filename");

            homepage.HomePageActionWithAdditem();
            screens.Takescreenshot9("filename");

            checkoutpage.Checkout_Continue();
            screens.Takescreenshot9("filename");

            overviewpage.Action_finish();


            overviewpage.validationCompleteProcess();
        }
Exemplo n.º 15
0
        public void ButtonIsDisplayed()
        {
            //Arrange
            var wineResultsPage    = new WineListPage(driver);
            var goodPage           = new GoodsItemPage(driver);
            var checkOutPage       = new CheckOutPage(driver);
            var wait               = new Waiters(driver);
            var country            = "Украина";
            var user               = new User();
            var minPriceValueToSet = 100;
            var maxPriceValueToSet = 2000;

            //Act
            FilteringActions.FilterByPriceRange(wineResultsPage, minPriceValueToSet, maxPriceValueToSet, wait);
            MainApllicationActions.ClickOnMore(wineResultsPage, wait).ChooseCountry(country, wait);
            ResultSetActions.SelectElement(wineResultsPage, 0, wait);
            MainApllicationActions.ClickOnButtonBuy(goodPage, wait).SubmitOfferButton(wait);
            AddUserDateActions.add(checkOutPage, user);
            MainApllicationActions.ClickOnButtonContinue(checkOutPage).ClickOnNotCall(wait);

            //Assert
            GoodVerificationStates.VerifyMakeOrderIsDispalyed(checkOutPage);
        }
Exemplo n.º 16
0
 public static CheckOutPage ClickOnNotCall(this CheckOutPage page, Waiters wait)
 {
     page.NotCall.Click();
     return(page);
 }
Exemplo n.º 17
0
 public static void Add(CheckOutPage page, User user)
 {
     page.Enter(page.Name, user.Getname());
     page.Enter(page.Phone, user.Getphone());
     page.Enter(page.Email, user.Getemail());
 }
Exemplo n.º 18
0
 public CheckOutViewModel(CheckOutPage currentPage)
 {
     CurrentPage = currentPage;
 }
Exemplo n.º 19
0
 public CheckOutViewModel(CheckOutPage currentPage)
 {
     CurrentPage = currentPage;
 }
 public CheckOutPageSteps(IWebDriver driver)
 {
     CheckOutPage = new CheckOutPage(driver);
     SignInPage   = new SignInPage(driver);
 }
Exemplo n.º 21
0
 public static void VerifyMakeOrderIsDispalyed(CheckOutPage page)
 {
     page.MakeOrder.Displayed.Should().BeTrue();
 }
Exemplo n.º 22
0
 public void CheckOut()
 {
     itemPage.CheckOut();
     checkOutPage = new CheckOutPage(driver);
 }