Ejemplo n.º 1
0
        public ShoppingCartEmptyPage NotUpdateMessage(Product invalidProduct, string data)
        {
            ShoppingCartComponent shoppingCartComponent = GetShoppingCartComponentByName(invalidProduct.Title);

            shoppingCartComponent.SandKeysQuantityField(data);
            shoppingCartComponent.ClickUpdateButton();

            return(new ShoppingCartEmptyPage(driver));
        }
Ejemplo n.º 2
0
        public ShoppingCartComponent GetShoppingCartComponentByName(string productName)
        {
            ShoppingCartComponent result = null;

            foreach (ShoppingCartComponent current in shopppingcartComponents)
            {
                if (current.GetProductName().ToLower()
                    .Equals(productName.ToLower()))
                {
                    result = current;
                    break;
                }
            }
            if (result == null)
            {
                throw new Exception("ProductName: " + productName + " not Found.");
            }
            return(result);
        }