New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unchecked checkboxes should return null and not false as their value #465

Closed
erdi opened this Issue Jan 8, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@erdi
Member

erdi commented Jan 8, 2017

This issue is about reverting changes added to fix #156. The rationale there is that false can be used to uncheck a checkbox but one can also use null as the value when unchecking a checkbox and the manual suggests to use groovy truth when checking if a checkbox is checked.

This special case of returning false for unchecked checkboxes means that they behave inconsistently in other parts of the API, namely when obtaining value of multiple checkboxes using form control shortcuts.

Note that this is breaking change and can only be introduced in the next major version.

@erdi erdi added the Improvement label Jan 8, 2017

@erdi erdi added this to the 2.0 milestone Jan 8, 2017

@erdi erdi modified the milestones: 2.0, 1.2 Oct 5, 2017

@Nossarian

This comment has been minimized.

Nossarian commented Apr 19, 2018

Documentation section 4.14.3 for the most current release still indicates that calling .value() on an unchecked checkbox will return 'false'. Please update the relevant documentation.

Thanks.

@erdi

This comment has been minimized.

Member

erdi commented Apr 19, 2018

Thanks for reporting @Nossarian, I created a new issue for it.

erdi added a commit to geb/geb that referenced this issue Jun 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment