Skip to content
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

click_button does not validate arguments as advertised #303

Closed
oalders opened this issue Jul 17, 2020 · 1 comment · Fixed by #314
Closed

click_button does not validate arguments as advertised #303

oalders opened this issue Jul 17, 2020 · 1 comment · Fixed by #314
Labels

Comments

@oalders
Copy link
Member

oalders commented Jul 17, 2020

The docs state that click_button():

Has the effect of clicking a button on the current form by specifying its name, value, or index. Its arguments are a list of key/value pairs. Only one of name, number, input or value must be specified in the keys.

However, something like ->click_button(name => 'foo', value => 'bar' ) will be run without complaints and can lead to confusing results.

We should enforce the advertised limits on what this method accepts as valid input.

@andyjack
Copy link

andyjack commented Jul 17, 2020

I believe the docs could use a tweak as well so that all of the allowed args are mentioned in the "Has the effect" para. id is never mentioned although it is in the list that follows. name, value, or index doesn't mention a few of the possible keys and index might mean number now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants