Ruby on Rails
Friday, July 19, 2013
On Thursday, July 18, 2013 11:53:01 AM UTC+1, João Pereira wrote:
Given this HTML in the view:
How do I select the value of the button with assert_select? I tryassert_select 'form input[type=submit]', "Send Reset Instructions"
This checks whether the input element contains that text, which doesn't look at attributes.
assert_select "form input[type=submit][value='Send Reset Instructions']"
should do the trick
FredYou received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c354653e-932f-4eb6-bae3-b006ae394b8d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment