/// <summary>
 /// Checks if the SearchResults are shown
 /// </summary>
 /// <returns></returns>
 public bool IsVisible()
 {
     if (browser.CheckElementExists(searchResults, 5000))
     {
         return(Driver.FindElement(searchResults).Displayed);
     }
     return(false);
 }
 /// <summary>
 /// Checks if MyCartPage is loaded
 /// </summary>
 /// <returns></returns>
 public bool IsLoaded()
 {
     if (browser.CheckElementExists(myCartPage, 5000))
     {
         return(Driver.FindElement(myCartPage).Displayed);
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Checks and validate if the Add to cart and Buy now items are available
 /// </summary>
 /// <returns></returns>
 public bool IsVisible()
 {
     if (browser.CheckElementExists(addToCartButton, 5000))
     {
         bool addToCartExists = Driver.FindElement(addToCartButton).Displayed;
         bool buyNowExists    = Driver.FindElement(buyNowButton).Displayed;
         bool isVisible       = addToCartExists == true && buyNowExists == true ? true : false;
         return(isVisible);
     }
     return(false);
 }
        /// <summary>
        /// Returns the product information - price and details
        /// </summary>
        /// <returns></returns>
        public List <String> ProductInformation()
        {
            if (browser.CheckElementExists(productPrice, 2000))
            {
                List <String> productInfo = new List <String>();
                productInfo.Add(Driver.FindElement(productPrice).Text);
                productInfo.Add(Driver.FindElement(productName).Text);

                return(productInfo);
            }
            return(null);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Closes the dialog
 /// </summary>
 public void CloseDialog()
 {
     if (browser.CheckElementExists(closeDialog, 2000))
     {
         browser.FindElement(closeDialog, 2000).Click();
     }
 }