How to select option in drop down using Capybara

后端 未结 9 1135
终归单人心
终归单人心 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:23

    Unfortunately, the most popular answer did not work for me entirely. I had to add .select_option to end of the statement

    select("option_name_here", from: "organizationSelect").select_option

    without the select_option, no select was being performed

提交回复
热议问题