capybara: how select drop down value below html
month 01 02 03 04 05 06 07 08 09 10 11 12
the from
option select
takes either id, name, placeholder, or text of associated label element of select element. "data-reactid" none of those. given html have put in comments (please edit question , add there) do
select("01") # assumes there no other select boxes option on page
or do
find('select[data-reactid=".0.0.1.1.2.1.$0.0.2.0.1"]').select("01")
which short for
find('select[data-reactid=".0.0.1.1.2.1.$0.0.2.0.1"]').find(:option, "01").select_option
note: within '#.0.0.1.1.2.1.$0.0.2.0.1'
isn't going since within takes css selector , none of elements have id '#.0.0.1.1.2.1.$0.0.2.0.1' ( data-reactid not id ) . on top of selector written invalid , need within '#\.0\.0\.1\.1\.2\.1\.\$0\.0\.2\.0\.1'
if element id existed
Comments
Post a Comment