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); }
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); }
public void Goto() { try { UiDriver.GotoPage("https:\\www.cars.com"); UiDriver.WaitForPageToLoad(); } catch (System.Exception ex) { // throw exception, removed for this take home } }