public void _0020_EditIndividualCompetition() { Browser.Visit("/"); Browser.FindCss("h4", "Test Individual Competition").Click(); Browser.ClickLink("Edit Competition"); Browser.FillIn("Name").With("Test Individual Competition Edited"); Browser.ClickButton("Save"); Assert.That(Browser, Shows.Css("h2", "Test Individual Competition Edited")); }
public void _0010_AddIndividualCompetition() { Browser.Visit("/"); Browser.EnsureLoggedIn(); Browser.ClickLink("Add Competition"); Browser.ClickLink("Add Individual Competition"); var now = DateTime.Now; const string dateFormat = "dd MMMM yyyy HH:mm"; Browser.FillIn("Name").With("Test Individual Competition"); Browser.FillIn("Start date & time").With(now.ToString(dateFormat)); Browser.FillIn("End date & time").With(now.AddHours(1).ToString(dateFormat)); Browser.Check("300yds"); Browser.FillIn("Location").With("Century Range, Bisley"); Browser.FillIn("Number of Sighting Shots").With("2"); Browser.FillIn("Number of Scoring Shots").With("10"); Browser.ClickButton("Create"); Assert.That(Browser, Shows.Css("h2", "Test Individual Competition")); Assert.IsTrue(Browser.Has(Browser.FindLink("Add Register Card"))); }
public void HasCss_with_text_matching_example() { Assert.That(browser, Shows.Css("#inspectingContent ul#cssTest li", text: new Regex("wo.*$"))); Assert.False(browser.HasCss("#inspectingContent ul#cssTest li", text: new Regex("fifty"))); }
public void HasCss_with_text_example() { Assert.That(browser, Shows.Css("#inspectingContent ul#cssTest li", text: "two")); Assert.False(browser.HasCss("#inspectingContent ul#cssTest li", text: "fifty")); }
public void HasCss_example() { Assert.That(browser, Shows.Css("#inspectingContent ul#cssTest")); Assert.IsFalse(browser.HasCss("#inspectingContent ul#nope")); }