Reputation: 2885
I want to check whether dropdown is selected or not
if(ie.select_list(:id, "DropDownList").selected?)#this is wrong
puts "selected"
else
puts "not selected"
end
how can I check this?
Upvotes: 1
Views: 836
Reputation: 118271
Look here find out the value in select list
ar_vals = ie.select_list(:id, "DropDownList").selected_options
ar_vals.empty? ? puts "not selected" : puts "selected"
Upvotes: 2