Beispiel #1
0
        public void FilterByPrice()
        {
            //Arrange
            var booksResultsPage   = new FilterPage(driver);
            var bookPage           = new GoodsItemPage(driver);
            var minpriceValueToSet = 20;
            var maxpriceValueToSet = 250;

            //Act
            FilteringContext.FilterByPriceRange(booksResultsPage, minpriceValueToSet, maxpriceValueToSet);
            ResultSetContext.SelectElement(booksResultsPage, 0);

            //Assert
            GoodStateVerificationContext.VerifyItemPrice(bookPage, minpriceValueToSet, maxpriceValueToSet);
        }
Beispiel #2
0
        public void BuyAProduct()
        {
            //Arrange
            var minpriceValueToSet = 100;
            var maxpriceValueToSet = 2000;
            var name = "‘ол≥о";

            var booksResultsPage = new FilterPage(driver);
            var SingleBookPage   = new GoodsItemPage(driver);
            var Basket           = new BasketPage(driver);
            var Checkout         = new CheckoutPage(driver);

            //Act
            FilteringContext.FilterByPriceRange(booksResultsPage, minpriceValueToSet, maxpriceValueToSet);
            FilteringContext.ClickCheckbox(booksResultsPage, name);
            ResultSetContext.BuyElement(booksResultsPage, 0);
            BasketContext.ProceedToCheckout(Basket);
            CheckoutContext.InputReceiverData(Checkout, "Testik", "0980000001", "*****@*****.**");
            //Assert
            GoodStateVerificationContext.VerifyMakeOrderIsClickable(Checkout);
        }
        public void Buy()
        {
            //Arrange
            var minpriceValueToSet = 100;
            var maxpriceValueToSet = 2000;
            var name            = "ю-аю-аю-цю-кю-лю-цю";
            int HowCanlongIwait = 15000;

            var booksResultsPage = new FilterPage(driver);
            var SingleBookPage   = new GoodsItemPage(driver);
            var Basket           = new BasketPage(driver);
            var Checkout         = new CheckoutPage(driver);

            //Act
            FilteringContext.FilterByPriceRange(booksResultsPage, minpriceValueToSet, maxpriceValueToSet, HowCanlongIwait);
            FilteringContext.ClickCheckbox(booksResultsPage, name, HowCanlongIwait);
            ResultSetContext.BuyElement(booksResultsPage, 0, HowCanlongIwait);
            BasketContext.ProceedToCheckout(Basket, HowCanlongIwait);
            CheckoutContext.InputReceiverData(Checkout, HowCanlongIwait);//modification with volid date
            //Assert
            VerificationContext.VerifyMakeOrderIsClickable(Checkout);
        }