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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -