Ejemplo n.º 1
0
        private ElementHasCssPropertyResult elementHasCssProperty(ElementProxy element, string propertyName, string propertyValue)
        {
            var result = new ElementHasCssPropertyResult();

            this.commandProvider.CssPropertyValue(element, propertyName, (hasProperty, actualPropertyValue) =>
            {
                if (!hasProperty)
                {
                    return;
                }

                result.HasProperty   = true;
                result.PropertyValue = actualPropertyValue;

                if (propertyValue != null && IsTextMatch(actualPropertyValue, propertyValue))
                {
                    result.PropertyMatches = true;
                }
            });

            return(result);
        }
        private ElementHasCssPropertyResult elementHasCssProperty(ElementProxy element, string propertyName, string propertyValue)
        {
            var result = new ElementHasCssPropertyResult();

            this.commandProvider.CssPropertyValue(element, propertyName, (hasProperty, actualPropertyValue) =>
            {
                if (!hasProperty) return;

                result.HasProperty = true;
                result.PropertyValue = actualPropertyValue;

                if (propertyValue != null && IsTextMatch(actualPropertyValue, propertyValue))
                {
                    result.PropertyMatches = true;
                }
            });

            return result;
        }