예제 #1
0
        public void AddProductToCart(string productName)
        {
            SearchMethods searchmethods = new SearchMethods();
            SearchPage    search        = searchmethods.Search(productName);

            search.AddAppropriateItemToShopingCart(productName);
        }
예제 #2
0
        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());
        }
예제 #3
0
        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());
        }
예제 #4
0
        public SearchPage SearchProduct(string productName)
        {
            SearchMethods searchmethods = new SearchMethods();

            return(searchmethods.Search(productName));
        }