public void Test001_UniversalSelectors() { using (Browser browser = new IE("http://localhost:8181/")) { var links = browser.CssSelectAll("*"); Console.WriteLine("{0} -- {1}", links.Count(), browser.Elements.Count()); //shouldn't these match? Assert.That(links.Count() > 20); } }
public void Test999_ClassSelectors() { using (Browser browser = new IE("http://localhost:8181/")) { var menu = browser.CssSelectAll("table.menu"); Assert.That(menu.Count() == 1); } }
public void Test003_AttributeSelectors_HasAttribute() { using (Browser browser = new IE("http://localhost:8181/")) { var links = browser.CssSelectAll("a[title]"); Assert.That(links.Any(e => e.TagName == "A")); } }
public void Test004_AttributeSelectors_ExactValue() { using (Browser browser = new IE("http://localhost:8181/")) { var links = browser.CssSelectAll("a[title='ASP.NET Website']"); Assert.That(links.Count() == 1); } }
public void Test002_TypeSelectors() { using (Browser browser = new IE("http://localhost:8181/")) { var links = browser.CssSelectAll("a"); Assert.That(links.Count() > 1); Assert.That(links.First().Text == "Log In"); } }