示例#1
0
        public void FindingStuff_CarBuzz()
        {
            browser.Visit("http://carbuzz.heroku.com/car_search");

            Console.WriteLine(browser.Has(browser.FindSection("Make")));
            Console.WriteLine(browser.HasNo(browser.FindSection("Bake")));

            browser.Check("Audi");
            browser.Check("BMW");
            browser.Check("Mercedes");

            Assert.That(browser.HasContentMatch(new Regex(@"\b83 car reviews found")));

            browser.FindSection("Seats").Click();
            browser.ClickButton("4");

            Assert.That(browser.HasContentMatch(new Regex(@"\b28 car reviews found")));
        }
示例#2
0
        public void WhenICheckTheCheckbox(string checkboxName)
        {
            switch (checkboxName)
            {
            case "Volunteering":
                BrowserSession.Check("Volunteering");
                break;

            case "Donations":
                BrowserSession.Check("Donations");
                break;

            case "Additional information":
                BrowserSession.FindCss(".lever").Click();
                break;
            }
        }