コード例 #1
0
 public void SetupForEveryTestMethod()
 {
     Driver                  = GetChromeDriver();
     TheTestSearch           = new TestSearch();
     TheTestSearch.City      = "";
     TheTestSearch.Ray       = 0;
     TheTestSearch.MinAmount = "other";
     TheTestSearch.MaxAmount = "ignore_filter";
 }
コード例 #2
0
        internal SearchResult FillOutFormAndSubmit(TestSearch search)
        {
            CityNameField.SendKeys(search.City);
            CityNameField.SendKeys(Keys.Space);
            var selectRay = new SelectElement(Ray);

            selectRay.SelectByValue(search.Ray.ToString());
            var selectMinPrice = new SelectElement(PriceFrom);

            selectMinPrice.SelectByValue(search.MinAmount);
            var selectMaxPrice = new SelectElement(PriceTo);

            selectMaxPrice.SelectByValue(search.MaxAmount);
            SearchButton.Click();
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            return(new SearchResult(Driver));
        }