Cucumber/webrat field issue

This may be a bit off topic but when running my cucumber tests for
clearance, webrat said it cannot find the password confirmation field.

Could not find field: “Confirm password” (Webrat::NotFoundError)
(eval):2:in fill_in' ./features/step_definitions/web_steps.rb:34:in/^(?:|I )fill in "([^
“])" with “([^”])”$/’
features/clearance_features/sign_up.feature:19:in `And I fill in
“Confirm password” with “password”’

It find all the other fields on the page but not sure why it cannot
find this one. it is there. Ideas?

Case issue: Confirm Password is what is actually on the page?

When I have problems with tools that parse web pages, my first attack
is to load the page in a browser and view the HTML source. It’s
usually some silly typo.

On Sun, Feb 28, 2010 at 10:30 AM, Me [email protected] wrote:

It find all the other fields on the page but not sure why it cannot
find this one. it is there. Ideas?


You received this message because you are subscribed to the Google G. “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Curtis C.
[email protected]
home:http://curtiscooley.com
blog:http://ponderingobjectorienteddesign.blogspot.com

Leadership is a potent combination of strategy and character. But if
you must be without one, be without the strategy.
– H. Norman Schwarzkopf

It appears to be looking for the actual text on the page because it
finds
the other fields that is what text is on the page. It should work as
this
stuff is generated from the cucmber/generator with clearance.

Here is the page source:

  1. First name*
  2. Last name*
  3. Email*
  4. Password*
  5. Confirm password*

You should read the docs a little more closely. Your label isn’t
“Confirm password” because it includes the abbr tag … so probably
you want to look for the id user_password_confirmation …Webrat will
match on label, id, or name of the field, although I’ve found
sometimes its easier to write my own rules to match on what I want,
even if it means dropping down to nokogiri and pulling the element I
want directly.

Not my label. Clearance put the all of the cucumber stuff in not me.