I know there are tons of this type of question, but I've tried a few solutions with no luck.
Here is the source for the Dropdown:
<select style="display: none;" name="Select_Company" id="Select_Company" class="company-list-select">
And then below is just a bunch of normal option values: IE:
<option value="2">Generic Company</option>
(This is repeated of course).
So here's what I've tried:
select('GenericCompany', :from => 'Select_Company')
select('Select_Company')select('Generic Company', :from => 'Select_Company')
also I tried (Which I imagine doesn't work because the "Please select a company" text is technically an option:
select 'ACME', from: "Please Select a Company"
All of them result in a Unable to find Element error. Any ideas? Im not really sure what to try.
This is using Capybara and Rspec, the rest of the code is fine as It works up to here (Where we go to select from the dropdown). The only thing I can think that's odd (I didn't write this site) is that after selected the dropdown class goes to this:
<div id="Select_Company_chosen" title="" style="width: 100%;" class="chosen-container chosen-container-single"><a class="chosen-single" tabindex="-1"><span>Please Select a Company</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input autocomplete="off" type="text"></div><ul class="chosen-results"><li data-option-array-index="0" style="" class="active-result result-selected">Please Select a Company</li><li data-option-array-index="1" style="" class="active-result">