ruby on rails - Angular material select for capybara -


can make select in ror rspec + capybara? use:

select 'something', from: 'select_name' 

but angular's md-select doesn't work. capybara show error:

capybara::elementnotfound: unable find select box "select_id"

for reason, riddler's solution wasn't finding option. rewrote using css selectors , able work:

def md_select(name, from:)   find("md-select[name='#{from}']").click   find('md-select-menu md-content md-option div', text: name).click end 

and usage so, display value of option (not value attribute):

md_select "female", from: 'gender' 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -