Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void TestZeroElements()
        {
            SetUpFindElementsReturnsEmpty();

            Actor.Invoking(x => x.AsksFor(CssValue.Of(Locator, "color"))).Should().Throw <WaitingException <bool> >();
        }
Esempio n. 3
0
        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");
        }
Esempio n. 4
0
 internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture)
 {
     return(Apply(CssValue.Of(target).AndTheProperty(PropertyName), converters, culture));
 }