Topic: Cucumber tests and selecting a radio button from a list
I'm using Cucumber, Webrat and Pickle for some BDD testing on a new app...basically my first "real" one. Having an issue with Cukes/Webrat.
I have the following bit of HTML being rendered from my rails app for a form I'm using:
And I have this Cucumber scenario:
The problem is line #5 in that scenario. I've tried every way I know how, and I still can't seem to get Cucumber (or is it actually Webrat?) to recognize that field. I keep getting errors like:
And I select "Credit Card" from "debt_category" # features/step_definitions/web_steps.rb:59
Could not find field: "debt_category" (Webrat::NotFoundError)
./features/step_definitions/web_steps.rb:60:in `/^(?:|I )select "([^\"]*)" from "([^\"]*)"$/'
features/manage_accounts.feature:17:in `And I select "Credit Card" from "debt_category"'
Any idea what value needs to be used when using Cukes/Webrat to test the selection of items in a radio button list?