You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It tells you it can't find the field, when really the field is there, but it just happened to be disabled at the time. Debugging this is tricky when when dealing with a react component where the disabled state is so brief that you didn't even know it existed. I'm sure there are many other cases of this. It would be great if capybara told me what the real issue was.
Meta
Capybara Version:
2.14.0
Expected Behavior
"Field <selector_used> was disabled so could not be filled in"
OR (less ideal but still a LOT better)
"Unable to find field <selector_used>. It could be disabled or hidden."
Actual Behavior
"Unable to find field <selector_used>"
Steps to reproduce
<inputtype="input" id="foo" disabled/>
fill_in('foo',with: 123)
Thank you for all your work btw. I love Capybara. :)
The text was updated successfully, but these errors were encountered:
PRs are gladly considered - although it gets really tricky to generate a comprehensive error message when custom filters can be added to any selector (just a warning before you attempt a PR). Also, if the disabled state was really brief then you shouldn't have received an error since Capybara should have automatically retried and found the field to fill in.
@gerrywastaken One relatively easy thing that can be done is to ensure selector filters that have default options are considered in the error description. Please try the WIP ffilter_error_messages branch and see if that's better for you.
It tells you it can't find the field, when really the field is there, but it just happened to be disabled at the time. Debugging this is tricky when when dealing with a react component where the disabled state is so brief that you didn't even know it existed. I'm sure there are many other cases of this. It would be great if capybara told me what the real issue was.
Meta
Capybara Version:
2.14.0
Expected Behavior
"Field <selector_used> was disabled so could not be filled in"
OR (less ideal but still a LOT better)
"Unable to find field <selector_used>. It could be disabled or hidden."
Actual Behavior
"Unable to find field <selector_used>"
Steps to reproduce
Thank you for all your work btw. I love Capybara. :)
The text was updated successfully, but these errors were encountered: