String getAttribute()

in module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy [626:637]


    String getAttribute(String name) {
        def element = ensureContainsAtMostSingleElement("getAttribute", String)

        if (element) {
            def attribute = element.getAttribute(name)
            if (attribute == 'false' && name in BOOLEAN_ATTRIBUTES) {
                attribute = null
            }

            attribute == null ? "" : attribute
        }
    }