Exemple #1
0
        public void amazon_LoginValidation()
        {
            String email        = "";
            string pass         = "";
            String product      = "Samsung Galaxy S9 64GB";
            String AlienProduct = "Alienware AW2521HFL";

            homePage.ClickIdentficate();
            signInPage.TypeEmail(email);
            signInPage.ClickContinue();
            signInPage.TypePassword(pass);
            signInPage.ClickSigninButton();
            homePage.SearchProduct(product);
            resultsPage.GetFisrPrice();
            resultsPage.ClickSamsung();
            resultsPage.GetDetailPrice();
            resultsPage.ValidatePrices();
            resultsPage.AddToCart();
            resultsPage.ClickCarritoButton();
            cartPage.GetPrice();
            cartPage.ValidatePrices();
            cartPage.ValidateItems();
            cartPage.SearchNewItem(AlienProduct);
            cartPage.AddToCart();
            cartPage.ValidateNewItems();
        }
        public void AddProductToCartTest()
        {
            CartPage cart = new CartPage(driver);

            cart.AddToCart();
            // test.Log(Status.Info, "Product Added To Cart Successfully..");
            //Validation
            Thread.Sleep(5000);
            Assert.IsTrue(driver.FindElement(By.XPath("//div[@class='_1QbRjw']")).Displayed);
            log.Info("AddProductToCartTest verification successfull");
        }