public void RemoveFromCart(string nameProduck) { ShopingCartPage shopingCartPage = new ShopingCartPage(); HomePage homePage = new HomePage(); TopBar topBar = new TopBar(); var product = homePage.FindAppropriateProduct(nameProduck); Thread.Sleep(500); product.ClickCartButton(); Thread.Sleep(500); topBar.ShoppingCartButtonClick(); shopingCartPage.GetProduct().GetProductName(); shopingCartPage.GetProduct().ClickRemoveButton(); shopingCartPage.GetEmptyCartMessage(); }
public void ClearShoppingCart() { TopBar navBar = new TopBar(); ShopingCartPage shopingCart = navBar.ShoppingCartButtonClick(); while (!shopingCart.IsEmpty()) { shopingCart.GetProduct().ClickRemoveButton(); } }
public string AddProductByNameUseSearch(string nameProduck) { ShopingCartPage shopingCartPage = new ShopingCartPage(); SearchMethods search = new SearchMethods(); TopBar topBar = new TopBar(); var searchResult = search.Search(nameProduck); Thread.Sleep(500); searchResult.AddAppropriateItemToCart(nameProduck); Thread.Sleep(500); topBar.ShoppingCartButtonClick(); return(shopingCartPage.GetProduct().GetProductName()); }
public string AddProductByName(string nameProduck) { ShopingCartPage shopingCartPage = new ShopingCartPage(); HomePage homePage = new HomePage(); TopBar topBar = new TopBar(); var product = homePage.FindAppropriateProduct(nameProduck); Thread.Sleep(500); product.ClickCartButton(); Thread.Sleep(500); topBar.ShoppingCartButtonClick(); return(shopingCartPage.GetProduct().GetProductName()); }
public string GetCurrencyFromShopingCart(ShopingCartPage shopingCartPage) { ShopingCartTableItem product = shopingCartPage.GetProduct(); string productPrice = product.GetProductPrice(); string cleanProductPrice = productPrice.Trim(); if (CurrentCurrencyFromMain == "€") { return(cleanProductPrice[cleanProductPrice.Length - 1].ToString()); } else { return(cleanProductPrice[0].ToString()); } }
public string AddProductByNameUseSearchWithLofinedUser(string nameProduck, string email, string password) { LoginPageMethods login = new LoginPageMethods(); login.LogIntoAccount(email, password); ShopingCartPage shopingCartPage = new ShopingCartPage(); SearchMethods search = new SearchMethods(); TopBar topBar = new TopBar(); var product = search.Search(nameProduck); product.AddAppropriateItemToCart(nameProduck); //Thread.Sleep(1000); topBar.ShoppingCartButtonClick(); return(shopingCartPage.GetProduct().GetProductName()); }