public void AddProductToCart(string productName) { SearchMethods searchmethods = new SearchMethods(); SearchPage search = searchmethods.Search(productName); search.AddAppropriateItemToShopingCart(productName); }
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 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()); }
public SearchPage SearchProduct(string productName) { SearchMethods searchmethods = new SearchMethods(); return(searchmethods.Search(productName)); }