static boolean matches()

in module/geb-core/src/main/groovy/geb/navigator/WebElementPredicates.groovy [30:41]


    static boolean matches(WebElement element, Map<String, Object> predicates) {
        predicates.findAll { it.key != DYNAMIC_ATTRIBUTE_NAME }.every { name, requiredValue ->
            def actualValue
            switch (name) {
                case "text": actualValue = element.text; break
                case "class": actualValue = element.getAttribute("class")?.tokenize(); break
                case "displayed": actualValue = element.displayed; break
                default: actualValue = element.getAttribute(name)
            }
            matches(actualValue, requiredValue)
        }
    }