
undefined method check for HiddenField
Reported by Lindsay Holmwood | March 23rd, 2009 @ 08:05 AM
Using check within Cucumber over this HTML fragment...
<input type="hidden" value="0" class="hidden" name="check[enabled]" id="check[enabled]"/>
<input type="checkbox" class="checkbox" value="1" name="check[enabled]" id="check[enabled]"/>
Gives me:
When I check "check[enabled]" # features/steps/webrat_steps.rb:24
undefined method `check' for #<Webrat::HiddenField:0xb6fe43ac> (NoMethodError) (eval):2:in `check' ./features/steps/webrat_steps.rb:25:in `/^I check "(.*)"$/' features/checks.feature:27:in `When I check "check[enabled]"'
Webrat version is 0.4.3.
Comments and changes to this ticket
-
gaffo May 7th, 2009 @ 05:33 PM
- State changed from new to open
Why would you want to check a hidden field? You also have 2 fields with the same name and ID which isn't really valid.
Thanks!
-
gaffo June 15th, 2009 @ 12:16 AM
- Tag changed from check, checkbox, form, hidden, hiddenfield, webrat to check, checkbox, form, hidden, hiddenfield, stale, webrat
-
gaffo June 15th, 2009 @ 12:17 AM
I'm marking this as stale, however, I will re-open it if anyone has a valid reason.
-
Lindsay Holmwood June 15th, 2009 @ 05:28 PM
Sorry I didn't respond to your previous question, apparently lighthouse doesn't auto-watch a ticket when you create it. :-/
The above HTML fragment was generated from merb-helpers' checkbox helper.
It turns out there's a bug in merb-helpers where it generates invalid markup (two fields with the same id amongst other things), so you can safely close this ticket.
(for reference, the Merb bug is at https://merb.lighthouseapp.com/projects/7433-merb/tickets/1248-patc...)
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.