selenium - How to select the hidden radio button using ruby capybara -
<tr> <td> <div align="right"> <font size="2" face="arial, helvetica, sans-serif" color="red"/> <font size="2" face="arial, helvetica, sans-serif" color="#004891">material type :</font> </div> </td> <td> <input type="radio" onclick="radioinsert='01'" name="rdinserttype"/> <font size="2" face="arial, helvetica, sans-serif" color="#004891"> promotion <input type="radio" onclick="radioinsert='02'" name="rdinserttype"/> important notice </font> </td>
i have tried following code :
capybara.ignore_hidden_elements = false session.find(:xpath, ".//*[@name = rdinserttype]", :match => :first).click
and
session.execute_script("('input').show()") session.choose('promotion', visible: false)
but no use. suggestion highly appreciated. in advance
Comments
Post a Comment