Пример #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");
        }
Пример #2
0
        public void Action_finish()
        {
            screenshot screens = new screenshot();

            FinishButton.Click();
            screens.Takescreenshot9("filename");
        }
Пример #3
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");
        }
Пример #4
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));
        }