How to select option in drop down using Capybara

后端 未结 9 1161
终归单人心
终归单人心 2020-12-23 23:47

I\'m trying to select an item from a drop down menu using Capybara (2.1.0).

I want to select by number (meaning select the second, third, etc option).

I\'ve

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 00:39

    If you take a look at the source of the select method, you can see that what it does when you pass a from key is essentially:

    find(:select, from, options).find(:option, value, options).select_option
    

    In other words, it finds the

    提交评论

提交回复
热议问题