ruby on rails 4 - Capybara::ElementNotFound radio by id -


i understand syntax capybara choosing radio button following

choose("label name") 

i running issue doing label has default name changed #id.

here html

 <label for="school_application_i_20"> require i-20 form?</label>     <br>     <label for="school_application_i_20_true">yes</label>     <input id="i-20-1" name="school_application[i_20]" type="radio" value="true" />     <label for="school_application_i_20_false">no</label>     <input id="i-20-2" name="school_application[i_20]" type="radio" value="false" />     <br> 

when try old method of choosing element

 choose('school_application_i_20_true') 

i

capybara::elementnotfound:    unable find radio button "school_application_i_20_true" 

when change choose use element id same error id. there way select radio button id?

you mapping label , trying treat radio? perhaps map input has type=radio, able use choose method element:

choose("i-20-1") 

not sure if need # prior id choose method... if doesnt find element try:

choose("#i-20-1") 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -