title: Watir-webdriver unable to identify button by value?
body: <p>As far as I know, using :value as a way to identify a button element should work just fine.  There are even multiple examples such as on the <a href="http://watirwebdriver.com/web-elements/" rel="nofollow">watirwebdriver.com</a> site that show this.  However when I attempt it, I get a fairly standard unable to locate message</p>
  
  <p>Here's a portion of the HTML from the page where the button is identified</p>
  
  <pre><code>&lt;div class="data-form-holder row-fluid"&gt;
      &lt;h4&gt;I am:&lt;/h4&gt;
      &lt;div class="btn-group" data-toggle="buttons-radio"&gt;
        &lt;button type="button" class="btn fb-user-type" name="fbRadios" value="is_agent"&gt;An Agent&lt;/button&gt;
        &lt;button type="button" class="btn fb-user-type" name="fbRadios" value="is_grower"&gt;A Grower&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>And here is what happens when trying to interact with the button (via IRB in this case, to troubleshoot) </p>
  
  <pre><code>1.9.3p125 :006 &gt; b.buttons(:class =&gt; "fb-user-type").count
   =&gt; 2   # yep, I can find the buttons I want, so not a frame issue etc.
  1.9.3p125 :008 &gt; b.button(:class =&gt; "fb-user-type").value
   =&gt; "is_agent"   # I can even get the value of the first one, which is as expected./
  1.9.3p125 :009 &gt; b.button(:value =&gt; "is_agent").flash
  Watir::Exception::UnknownObjectException: unable to locate element, using {:value=&gt;"is_agent", :tag_name=&gt;"button"}
      from /Users/cvanderlinden/.rvm/gems/ruby-1.9.3-p125/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:490:in `assert_exists'
      from /Users/cvanderlinden/.rvm/gems/ruby-1.9.3-p125/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:420:in `style'
      from /Users/cvanderlinden/.rvm/gems/ruby-1.9.3-p125/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:232:in `flash'
      from (irb):9
      from /Users/cvanderlinden/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `&lt;main&gt;'
  #well that was annoying, I used a value I know exists, it just read it to me, but 
  # I cannot find the button that way?
  
  1.9.3p125 :004 &gt; b.buttons(:value =&gt; "is_agent").count
   =&gt; 0   # kinda expected since flash on a single button failed.. 
  1.9.3p125 :018 &gt; b.button(:text =&gt; "An Agent").flash  #this works
   =&gt; #&lt;Watir::Button:0x7d6f5d1340a3b6b8 located=true selector={:text=&gt;"An Agent", :tag_name=&gt;"button"}&gt; 
  1.9.3p125 :020 &gt; b.button(:text =&gt; "An Agent").value
   =&gt; "is_agent"   #also shows me the value I expect
  1.9.3p125 :022 &gt; b.button(:text =&gt; "An Agent").attribute_value("value")
   =&gt; "is_agent"   #same answer via another means
  1.9.3p125 :023 &gt; b.button(:value =&gt; "is_agent").exists?
   =&gt; false        #and yet, finding it by value, supported but failing.. 
  </code></pre>
  
  <p>Anyone with an idea why I can't identify by value? </p>