public void CssValueElement_ShouldReturnCorrectValue(string id, string cssProperty, string expected) { //arrange var target = Target.The("css value element").LocatedBy(By.Id(id)); var question = CssValue.Of(target).AndTheProperty(cssProperty).Value; //act var actual = Answer(question); //assert Assert.Equal(expected, actual); }
public void TestZeroElements() { SetUpFindElementsReturnsEmpty(); Actor.Invoking(x => x.AsksFor(CssValue.Of(Locator, "color"))).Should().Throw <WaitingException <bool> >(); }
public void TestCssValue() { WebDriver.Setup(x => x.FindElement(It.IsAny <By>()).GetCssValue(It.IsAny <string>())).Returns("red"); Actor.AsksFor(CssValue.Of(Locator, "color")).Should().Be("red"); }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { return(Apply(CssValue.Of(target).AndTheProperty(PropertyName), converters, culture)); }