When I write this step in the scenario: When I select "October 5, 2009" as the "Start date" date
Webrat raises "Could not find field: "task_start_date_1i" (Webrat::NotFoundError)"
View HTML source shows:
I dont know why webrat adds an "li" postfix to the id of the field and get error. Please help!!!
Webrat is assuming that your start_date field is a date select, which Rails implements as three drop downs: one each for day, month, and year. The "1i" postfix is how Rails manages to combine those three input fields into the single date attribute. This is called multipart parameter assignment; here's a good post about how this works and why: http://www.spacevatican.org/2008/12/3/dates-params-and-you
You'll have to tell Webrat that you're using a single text field as your start_date input element. I'm not sure how you do this, but I'm sure it's possible.