Esempio n. 1
0
 public void SearchProduct(String item)
 {
     try
     {
         driver.WaitForElementClickable(SearchInput);
         SearchInput.SendKeys(item);
         Console.WriteLine("** Item Entered  **");
         SearchButton.Click();
         Console.WriteLine("** Submited  **");
     }
     catch (Exception e)
     {
         Console.WriteLine("No se pudo...");
         driver.CleanUp();
     }
 }
Esempio n. 2
0
 public void ClickFirstProduct()
 {
     try
     {
         driver.WaitForElementClickable(FirstProduct);
         FirstProduct.Click();
         Console.WriteLine("** First Item Selected **");
     }catch (Exception e)
     {
         Console.WriteLine("-- Failed: --", e.Message);
         driver.CleanUp();
     }
 }
 public void AddToCart()
 {
     try
     {
         driver.WaitForElementClickable(AddToCartButton);
         AddToCartButton.Click();
         Console.WriteLine("**Item added to the cart**");
     }
     catch (Exception e)
     {
         Console.WriteLine("--Failed: ", e.Message);
         driver.CleanUp();
     }
 }