Exemplo n.º 1
0
        public void HomePageActionWithAdditem()
        {
            screenshot screens = new screenshot();


            //this fuction is not working yet

            //WebDriverWait wait = new WebDriverWait(CommonDriver.driver, new TimeSpan(0, 0, 10));
            //wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//div[@id='shopping_cart_container']")));

            //SelectElement Oselection = new SelectElement(SelectButton);
            //Oselection.SelectByText("Name (Z to A)");

            BackPackImg.Click();
            screens.Takescreenshot2("filename");
            screens.Takescreenshot9("filename");

            ImgBackButton.Click();
            screens.Takescreenshot2("filename");
            screens.Takescreenshot9("filename");

            ImgADDTOCARTButton.Click();
            screens.Takescreenshot2("filename");
            screens.Takescreenshot9("filename");

            CartImg.Click();
            Console.WriteLine("The item that the customer chose is " + ItemName.Text);
            screens.Takescreenshot2("filename");
            screens.Takescreenshot9("filename");
        }
Exemplo n.º 2
0
        public void HomePageActionWithDeleteitem()
        {
            screenshot screens = new screenshot();

            BackPackImg.Click();
            screens.Takescreenshot3("filename");

            ImgBackButton.Click();
            screens.Takescreenshot3("filename");

            ImgADDTOCARTButton.Click();
            screens.Takescreenshot3("filename");

            CartImg.Click();
            screens.Takescreenshot3("filename");

            RemoveButton.Click();
            screens.Takescreenshot3("filename");

            ConitnueShoppingButton.Click();
            screens.Takescreenshot3("filename");

            CartImg.Click();
            screens.Takescreenshot3("filename");
        }
Exemplo n.º 3
0
        public void Action_finish()
        {
            screenshot screens = new screenshot();

            FinishButton.Click();
            screens.Takescreenshot9("filename");
        }
Exemplo n.º 4
0
        public void CustomerClickMenuButton()
        {
            screenshot screens = new screenshot();

            MenuButton.Click();
            screens.Takescreenshot4("filename");
            //CartImg.Click();
            //Console.WriteLine("The item that the customer chose is " + ItemName.Text);
        }
Exemplo n.º 5
0
        public void checkout_filldifferentInfor(string firstname, string lastname, string zip)
        {
            screenshot screens = new screenshot();


            FirstNameT.SendKeys(firstname);
            LastNameT.SendKeys(lastname);
            PostCodeT.SendKeys(zip);
        }
Exemplo n.º 6
0
        public void CustomerBuyingOneMoreItems()
        {
            screenshot screens = new screenshot();

            //ImgADDTOCARTButton.Click();
            //screens.Takescreenshot3("filename");
            ItemFristOne.Click();
            ItemNameSec.Click();
            //ImgADDTOCARTButton.Click();
            CartImg.Click();
            Console.WriteLine("The item that the customer chose is " + ItemNameCart.Text);
            Console.WriteLine("The item that the customer chose is " + ItemNameSecCart.Text);
        }
Exemplo n.º 7
0
        public void Checkout_Cancel()
        {
            screenshot screens = new screenshot();

            CheckoutButton.Click();
            FirstNameT.SendKeys("sggi");
            LastNameT.SendKeys("r");
            PostCodeT.SendKeys("12345");
            screens.Takescreenshot6("filename");

            CancelButton.Click();
            screens.Takescreenshot6("filename");
        }
Exemplo n.º 8
0
        public void Checkout_Continue()
        {
            screenshot screens = new screenshot();

            CheckoutButton.Click();

            FirstNameT.SendKeys("sggi");

            LastNameT.SendKeys("r");

            PostCodeT.SendKeys("12345");
            screens.Takescreenshot5("filename");
            screens.Takescreenshot9("filename");

            ContiuneButton.Click();
            screens.Takescreenshot5("filename");
            screens.Takescreenshot9("filename");
        }
Exemplo n.º 9
0
        public void ParameterisedLoginData(string username, string password)
        {
            screenshot screens = new screenshot();

            Username.SendKeys(username);
            Console.WriteLine("The name of the customer is " + username);

            Password.SendKeys(password);
            Console.WriteLine("the password is " + password);

            screens.Takescreenshot("filename");
            screens.Takescreenshot2("filename");
            screens.Takescreenshot4("filename");
            screens.Takescreenshot9("filename");

            Login.Click();

            WebDriverWait wait = new WebDriverWait(CommonDriver.driver, TimeSpan.FromSeconds(10));
        }