How to select a drop-down menu in ruby ​​watir parameter?

This is my snapshot, and I want to select it according to my value option

<select id =""> <option value="01" title=" 01 - Live animals"> 01 - Live animals</option> </select> 

I know how to select dropdown content, i.e.

 ie.select_list(:id, "DropDownList_Product").select("01 - Live animals") 

Actually, I want to select drop down on its value 01, what do I need to do for this?

+6
source share
1 answer

Something like this should work:

 ie.select_list(:id, "DropDownList_Product").select_value("01") 

Additional information at http://rdoc.info/gems/watir-webdriver/Watir/Select#select_value-instance_method

+13
source

Source: https://habr.com/ru/post/947527/


All Articles