title: Capybara choose method Unable to find radio button
body: <p>I have a form which is generated by simple form:</p>
  
  <pre><code>TL TR
  &lt;div class="form-group radio_buttons required user_register_temp_package"&gt;
    &lt;label class="radio_buttons required control-label"&gt;
      &lt;abbr title="zorunlu"&gt;
        *
      &lt;/abbr&gt;
      Paket
    &lt;/label&gt;
    &lt;label class="radio"&gt;
      &lt;input class="radio_buttons required" id="user_register_temp_attributes_domain_package_id_1" name="user[register_temp_attributes][domain_package_id]" type="radio" value="1"&gt;
      Small
    &lt;/label&gt;
    &lt;label class="radio"&gt;
      &lt;input checked="checked" class="radio_buttons required" id="user_register_temp_attributes_domain_package_id_2" name="user[register_temp_attributes][domain_package_id]" type="radio" value="2"&gt;
      Medium
    &lt;/label&gt;
    &lt;label class="radio"&gt;
      &lt;input class="radio_buttons required" id="user_register_temp_attributes_domain_package_id_3" name="user[register_temp_attributes][domain_package_id]" type="radio" value="3"&gt;
      Large
    &lt;/label&gt;
  &lt;/div&gt;
  TL TR
  </code></pre>
  
  <p>I have a simple spec like this:</p>
  
  <pre><code># encoding: UTF-8
  require 'spec_helper'
  
  feature 'Register' do
  
    background do
      visit new_user_registration_path
    end
  
    scenario 'fill register form and register' do
      # TL TR
      choose('user_register_temp_attributes_domain_package_id_1')
      # TL TR
    end
  
  end
  </code></pre>
  
  <p>My spec_helper.rb is</p>
  
  <pre><code>ENV['RAILS_ENV'] ||= 'test'
  require File
  
  .expand_path('../../config/environment', __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'
  require 'capybara/rspec'
  
  Capybara.javascript_driver = :webkit
  Capybara.default_selector = :css
  
  Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
  
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
  
  RSpec.configure do |config|
    # ## Mock Framework
    #
    # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
    #
    # config.mock_with :mocha
    # config.mock_with :flexmock
    # config.mock_with :rr
  
    # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
    config.fixture_path = "#{::Rails.root}/spec/fixtures"
  
    # If you're not using ActiveRecord, or you'd prefer not to run each of your
    # examples within a transaction, remove the following line or assign false
    # instead of true.
    config.use_transactional_fixtures = true
  
    # If true, the base class of anonymous controllers will be inferred
    # automatically. This will be the default behavior in future versions of
    # rspec-rails.
    config.infer_base_class_for_anonymous_controllers = false
  
    # Run specs in random order to surface order dependencies. If you find an
    # order dependency and want to debug it, you can fix the order by providing
    # the seed, which is printed after each run.
    #     --seed 1234
    config.order = 'random'
  
    # Capybara DSL
    config.include Capybara::DSL
  
    # Factory girl
    config.include FactoryGirl::Syntax::Methods
  
  end
  </code></pre>
  
  <p>The Capybara API for the <code>choose</code> method says: </p>
  
  <blockquote>
    <p>"Find a radio button and mark it as checked. The radio button can be found via name, id or label text."</p>
  </blockquote>
  
  <p>But when I run spec with <code>choose('user_register_temp_attributes_domain_package_id_1')</code>, I get
  <code>Capybara::ElementNotFound: Unable to find radio button "user_register_temp_attributes_domain_package_id_1"</code> </p>
  
  <p>I've tried code below but got <code>Capybara::ElementNotFound: Unable to find css "user_register_temp_attributes_domain_package_id_1"</code> error:</p>
  
  <p><code>find('#user_register_temp_attributes_domain_package_id_1[value=1]').set(true)</code> </p>
  
  <p>It seems there is no problem with <code>fill_in</code>, <code>check</code> or <code>click_button</code> methods. </p>
  
  <p>Regards.</p>