I am having an issue extracting all the options in a drop down and then iterating through values to get selected value. Ruby code Below:
select = @@driver.find_element(:id, 'dropdown_7')
all_options = select.find_elements(:tag_name, 'option')
all_options.each do |i|
puts 'Value is: ' + i.attribute('Andorra')
i.click
HTML code:
<select id="dropdown_7" name="dropdown_7" class=" piereg_validate[required]"><option value="Afghanistan">Afghanistan</option></select>
Error Message: `+': no implicit conversion of nil into String (TypeError)
Not sure what this means apart from + = nil and no conversion of string?