protected boolean setCheckboxValue()

in module/geb-core/src/main/groovy/geb/navigator/DefaultNavigator.groovy [1022:1035]


    protected boolean setCheckboxValue(WebElement input, value) {
        if (value == null || value == false || (value instanceof Collection && value.empty)) {
            unselect(input)
        } else if (value == true) {
            select(input)
        } else {
            def values = value instanceof Collection ? value*.toString() : [value]
            if (getValue(input) in values || labelFor(input) in values) {
                select(input)
            } else {
                unselect(input)
            }
        }
    }