Ejemplo n.º 1
0
 public bool IsCheckAvailabilityDisplayed()
 {
     try
     {
         UiDriver.WaitForPageToLoad();
         return(UiDriver.IsDisplayed(btnCheckAvailibility));
     }
     catch (System.Exception ex)
     {
         // throw exception, log it, but removed for this take home
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool HeaderSearchFilterExists(string filter)
 {
     //in real world, the input filters css selector would be dynamically created instead of being hard coded By types from above
     //also, it would be better to simply get all filters being used and rename this function GetHeaderSearchFilters() or something else...
     try
     {
         if (filter == "Maximum Price: $50,000")
         {
             return(UiDriver.IsElementExist(filterMaxPrice50k));
         }
         if (filter == "Honda")
         {
             return(UiDriver.IsElementExist(filterHonda));
         }
         if (filter == "Pilot")
         {
             return(UiDriver.IsElementExist(filterPilot));
         }
         if (filter == "Used")
         {
             return(UiDriver.IsElementExist(filterUsed));
         }
         if (filter == "New")
         {
             return(UiDriver.IsElementExist(filterNew));
         }
         if (filter == "Touring8Passenger")
         {
             return(UiDriver.IsElementExist(filterTouring8Passenger));
         }
         UiDriver.WaitForPageToLoad();
     }
     catch (System.Exception ex)
     {
         // throw exception, log it, but removed for this take home
     }
     return(false);
 }
Ejemplo n.º 3
0
 public void Goto()
 {
     try
     {
         UiDriver.GotoPage("https:\\www.cars.com");
         UiDriver.WaitForPageToLoad();
     }
     catch (System.Exception ex)
     {
         // throw exception, removed for this take home
     }
 }