Ejemplo n.º 1
0
 public void AddToCart(ShopItemBO shopItem)
 {
     wait.Until(ExpectedConditions.ElementIsVisible(pressBlackButtonColor));
     BtnBlackColor.Click();
     BtnAddToCart.Click();
     wait.Until(ExpectedConditions.ElementIsVisible(proceedToCheckOut));
     BtnProceedToCheckOut.Click();
 }
 public String removeItemFromWishlist(ShopItemBO shopItem)
 {
     wait.Until(ExpectedConditions.ElementIsVisible(myWishlist));
     BtnWishlist.Click();
     wait.Until(ExpectedConditions.ElementIsVisible(removeFromWishlist));
     BtnRemoveFromWishlist.Click();
     Thread.Sleep(500);
     BtnWishlist.Click();
     wait.Until(ExpectedConditions.ElementIsVisible(removedSuccessfullyAlert));            
     return LblRemovedFromWishlist.Text;
 }
Ejemplo n.º 3
0
        public void AddToWishlistTest()
        {
            var productGridViewPage = new MS_ProductViewPage(driver);
            var shopItem            = new ShopItemBO();

            productGridViewPage.ChooseFirstItem(shopItem);

            var actualResult   = productGridViewPage.WishlistItem(shopItem);
            var expectedResult = "Added to your wishlist.";

            Assert.AreEqual(expectedResult, actualResult);
        }
        public void BuyDress()
        {
            var productGridViewPage = new MS_ProductViewPage(driver);
            var shopItem            = new ShopItemBO();

            productGridViewPage.ChooseFirstItem(shopItem);
            productGridViewPage.AddToCart(shopItem);

            var shoppingCart = new MS_ShoppingCartPage(driver);

            var actualResult   = shoppingCart.ProceedToCheckoutWithoutChanges();
            var expectedResult = "Your order on My Store is complete.";

            Assert.AreEqual(expectedResult, actualResult.Trim());
        }
Ejemplo n.º 5
0
        public MS_ProductViewPage ChooseFirstItem(ShopItemBO shopItem)
        {
            // Search for the desired item
            wait.Until(ExpectedConditions.ElementIsVisible(searchBox));
            ISearchBox.Click();
            ISearchBox.SendKeys(shopItem.itemName);
            ISearchBox.SendKeys(Keys.Enter);
            wait.Until(ExpectedConditions.ElementIsVisible(gridView));

            // Make sure we have the Grid view perspective
            BtnGridView.Click();
            wait.Until(ExpectedConditions.ElementIsVisible(firstResult));

            // Select first result
            LblFirstResult.Click();
            return(new MS_ProductViewPage(driver));
        }
Ejemplo n.º 6
0
 public String WishlistItem(ShopItemBO shopItem)
 {
     BtnWishList.Click();
     wait.Until(ExpectedConditions.ElementIsVisible(modalBox));
     return(LblSuccessfullyAdded.Text);
 }