1

我想检查是否选择了下拉菜单

if(ie.select_list(:id, "DropDownList").selected?)#this is wrong
  puts "selected"
else
   puts "not selected"
end

我该如何检查?

4

1 回答 1

2

看这里find out the value in select list

ar_vals = ie.select_list(:id, "DropDownList").selected_options
ar_vals.empty? ? puts "not selected" : puts "selected"
于 2013-07-02T08:24:46.083 回答