Esempio n. 1
0
 public void EnterFirstNameLastNameEmail(string firstName, string lastName, string email)
 {
     try
     {
         UiDriver.ClearAndSendKeys(tBxFirstName, firstName);
         UiDriver.ClearAndSendKeys(tBxLastName, lastName);
         UiDriver.ClearAndSendKeys(tBxEmail, email);
         UiDriver.WaitForPageToLoad();
     }
     catch (System.Exception ex)
     {
         // throw exception, log it, but removed for this take home
     }
 }
Esempio n. 2
0
        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
            }
        }