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
Post a Comment