In my rspec test, how do I fill_in a text field using Placeholder. I cannot use id and name as they are auto generated for the nested form.
<input class="input-medium inline" id="user_kids_attributes_new_1342116887461_first_name" name="user[kids_attributes][new_1342116887461][first_name]" placeholder="First Name" size="30" type="text">
Thanks
There is also another way:
fill_in :placeholder => "Fill in some text", :with => "Text"
Placeholder support will be in the next version of Capybara. For now, try:
find("input[placeholder='First Name']").set "value"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With