public void SElementShouldHaveCssClass() { Given.OpenedPageWithBody("<h1 class='big-title'>Hello Babe!</h1>"); Selene.S("h1").ShouldNot(Have.CssClass("title")); When.WithBody("<h1 class='big title'>Hello world!</h1>"); Selene.S("h1").Should(Have.CssClass("title")); }
public void Complete_Todo() { Open("http://todomvc.com/examples/emberjs/"); S("#new-todo").SetValue("a").PressEnter(); S("#new-todo").SetValue("b").PressEnter(); S("#new-todo").SetValue("c").PressEnter(); SS("#todo-list>li").FindBy(Have.ExactText("b")).Find(".toggle").Click(); SS("#todo-list>li").FilterBy(Have.CssClass("completed")).Should(Have.ExactTexts("b")); SS("#todo-list>li").FilterBy(Have.No.CssClass("completed")).Should(Have.ExactTexts("a", "c")); }
public void ShouldReflectTheFullLocatorForComposedElement() { var element = ( SS(".parent").FilterBy(Be.Visible)[0] .SS(".child").FindBy(Have.CssClass("special")) // TODO: Have.CssClass("...").And(Have.Text("...").Not) .S("./following-sibling::*") ); var representation = element.ToString(); Assert.AreEqual( "Browser.All(.parent).By(Visible)[0].All(.child).FirstBy(has CSS class 'special').Element(./following-sibling::*)", representation ); }