I know this question sounds like a repeat but I have tried solutions I have found on here and none have worked for me thus far.
Implementing solutuons from the following questions:
https://stackoverflow.com/questions/7489917/using-selenium-2-and-firefox-how-do-you-select-a-dropdown-selection Selenium WebDriver and DropDown Boxes
Reference for methods in Ruby: http://selenium.googlecode.com/svn/trunk/docs/api/rb/index.html#selenium-webdriver
I am using selenium with cucumber to test a website.I am working in IE 8.
chan_text = @driver.find_element(:css,'select#check-list option').text
select_list = @driver.find_element(:css,'select#check-list')
dropdown = Selenium::WebDriver::Support::Select.new(select_list)
dropdown.select_by(:text, chan_text)
The source looks like the following:
<select id="check_list" multiple="">
<option selected="" value="81" label="MILK">MILK</option>
<option value="82" label="CHEESE">CHEESE</option>
<option value="83" label="DOUGHNUTS">DOUGHNUTS</option>
</select>
When an option is selected the page should refresh. This is not occurring at all, the menu just remains open. Any help appreciated, please request more info if needed. I will delete this question if it really is a repeat.