[rspec-users] specifying which button webrat should press

James Byrne
2009-02-20T20:13:16Z

Given this:




   <input id="submit_commit_client" name="commit"
type="submit"
value="Create" />




If I want webrat to select on the ccs id (#submit_commit_client) rather
than the value (Create) how do I pass this to click_button?

I have tried this:

click_button("#submit_commit_client")

Which gives this error:

Could not find button "#submit_commit_client" (Webrat::NotFoundError)

/usr/lib64/ruby/gems/1.8/gems/webrat-0.4.1/lib/webrat/core/locators/locator.rb:14:in
`locate!''