我想检查是否选择了下拉列表
if(ie.select_list(:id, "DropDownList").selected?)#this is wrong
puts "selected"
else
puts "not selected"
end
我该怎么检查?
答案 0 :(得分: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"