Add .check and .uncheck commands for immutable checkbox operations #4232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will add the .check and .uncheck commands for changing the checked/selected state of toggleable input elements like checkboxes to checked or unchecked taking into account their current checked/selected state (e.g. .check() won't click an already checked checkbox input, .uncheck() won't click an unchecked input).
This is a useful feature so that users don't have to first check the current checked/selected state of the element before issuing the click command (or not) to alter the checked state. Additionally, its less error-prone and more easily conveys the intention versus issuing the check command.
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
examples/tests
directory of the project) and running them.ecosia.js
andduckDuckGo.js
are good examples to work with.features/my-new-feature
orissue/123-my-bugfix
);