public ShoppingCartEmptyPage NotUpdateMessage(Product invalidProduct, string data) { ShoppingCartComponent shoppingCartComponent = GetShoppingCartComponentByName(invalidProduct.Title); shoppingCartComponent.SandKeysQuantityField(data); shoppingCartComponent.ClickUpdateButton(); return(new ShoppingCartEmptyPage(driver)); }
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); }