public void SelectNewFilter() { try { UiDriver.Click(rBtnNew); UiDriver.WaitForPageToLoad(); } catch (System.Exception ex) { // throw exception, log it, but removed for this take home } }
public void Search(string stockType, string make, string model, string maxPrice, string radius, string zipCode) { //for this assingment, the input parameters obviously don't do anything, but in the real world, //this would convert the string and dynamically create the css selector instead of selecting from a predefined option above try { UiDriver.Click(DdStockType); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdStockTypeUsed); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMake); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMakeHonda); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdModel); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdModelPilot); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMaxPrice); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMaxPrice50k); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMaxDistance); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdMaxDistance100); UiDriver.WaitForPageToLoad(); UiDriver.Click(DdZipCode); UiDriver.ClearAndSendKeys(DdZipCode, zipCode); UiDriver.WaitForPageToLoad(); //System.Threading.Thread.Sleep(3000); UiDriver.Click(BtnSearch); UiDriver.WaitForPageToLoad(); } catch (System.Exception ex) { // throw exception, removed for this take home } }