public void AddOrder(String ccode, String cname, String pname, String qty)
        {
            //Select Customer
            SearchCustomer.Click();
            Thread.Sleep(3000);
            SearchCode.SendKeys(ccode);
            SearchName.SendKeys(cname);
            RunSearch.Click();
            Thread.Sleep(3000);
            SelectCustomer.Click();
            Thread.Sleep(5000);

            //Select Product
            SearchProduct.Click();
            Thread.Sleep(3000);
            SearchPName.SendKeys(pname);
            RunPSearch.Click();
            Thread.Sleep(3000);
            SelectProduct.Click();
            Thread.Sleep(3000);

            //Finish the follow flow
            AddQty.SendKeys(qty);
            AddBtn.Click();
            Thread.Sleep(3000);
            CompleteBtn.Click();
        }
        public void FindProduct()
        {
            IJavaScriptExecutor js = Properties.driver as IJavaScriptExecutor; // Javascript'e etki edecek referans.

            js.ExecuteScript("window.scrollBy(0,500)");                        // Kaydırma çubuğu Y ekseninde 1300 birim aşağı hareket eder.
            SelectProduct.Click();                                             // İlgili ürüne tıklanır.
            System.Threading.Thread.Sleep(4000);                               // İçerik aktif olana kadar bekler.
            js.ExecuteScript("window.scrollBy(0,200)");                        // Kaydırma çubuğu Y ekseninde 1300 birim aşağı hareket eder.
            Ask.Click();                                                       // Mağazaya soru sor butonuna tıklanır ve otomatik olarak kaydırma çubuğu aşağı iner.
            System.Threading.Thread.Sleep(2000);                               // İçerik aktif olana kadar bekler.
            AskSeller.Click();                                                 // Tekrardan mağazaya soru sor butonuna tıklanır.
            System.Threading.Thread.Sleep(2000);                               // İçerik aktif olana kadar bekler.
        }
Exemplo n.º 3
0
        internal void SearchingProduct()
        {
            EnterProductName.SendKeys("Villa Maria");
            Thread.Sleep(2000);

            SelectProduct.Click();
            Thread.Sleep(5000);


            if (Product.Displayed)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test PASS, User can search the wine successfullyusing the search bar");
            }
            else
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test FAIL,User can't serarch the wine using search bar");
            }

            TastingNotes.Click();
            Thread.Sleep(2000);

            if (CriticReviews.Displayed)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Pass,Critic Reviews Visible");
            }
            else
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Fail,Critic Revies Not Visible");
            }

            if (UserReviews.Displayed)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Pass,User Reviews Visible");
            }
            else
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Fail,User Reviews Not Visible");
            }
        }
Exemplo n.º 4
0
 public void AddProductInCart()
 {
     SelectProduct.Click();
     SeeDetails.Click();
     AddToCart.Click();
 }