Пример #1
0
        /// <summary>
        /// Checks if the app is logged In.
        /// </summary>
        /// <returns></returns>
        public bool IsVisible()
        {
            var  buttonText = browser.FindElement(loginMenu, 2000).Text;
            bool isVisible  = buttonText == "My Account" ? true : false;

            return(isVisible);
        }
 /// <summary>
 /// Remove all items from the My Cart Page
 /// </summary>
 public void RemoveAllItems()
 {
     browser.FindElement(cartButton, 5000).Click();
     if (browser.CheckElementExists(removeButton, 5000))
     {
         while (Driver.FindElement(removeButton).Displayed)
         {
             Driver.FindElements(removeButton)[1].Click();
             Driver.FindElement(removeConfirmationButton).Click();
         }
         Driver.FindElement(homeButton).Click();
     }
 }
Пример #3
0
 /// <summary>
 /// Adds to cart the selected items
 /// </summary>
 public void AddToCart()
 {
     browser.FindElement(addToCartButton, 5000).Click();
 }
 /// <summary>
 /// Completes the purchase
 /// </summary>
 public void CompletePurchase()
 {
     browser.FindElement(continueButton, 2000).Click();
 }