这是我的下拉菜单,我想在其值选项上选择它
<select id ="">
<option value="01" title=" 01 - Live animals"> 01 - Live animals</option>
</select>
Run Code Online (Sandbox Code Playgroud)
我知道如何选择下载其内容即
ie.select_list(:id, "DropDownList_Product").select("01 - Live animals")
Run Code Online (Sandbox Code Playgroud)
实际上我想选择下拉它的值01,我该怎么办呢?
Žel*_*pin 14
这样的事情应该有效:
ie.select_list(:id, "DropDownList_Product").select_value("01")
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请访问http://rdoc.info/gems/watir-webdriver/Watir/Select#select_value-instance_method