这是我的下拉菜单,我想在其值选项中选择它
<select id ="">
<option value="01" title=" 01 - Live animals"> 01 - Live animals</option>
</select>
我知道如何选择其内容的下拉菜单,即
ie.select_list(:id, "DropDownList_Product").select("01 - Live animals")
实际上我想在其值 01 上选择下拉菜单,我应该怎么做?
像这样的东西应该工作:
ie.select_list(:id, "DropDownList_Product").select_value("01")
更多信息请访问http://rdoc.info/gems/watir-webdriver/Watir/Select#select_value-instance_method