<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -106,6 +106,10 @@ module Webrat
       @element[&quot;value&quot;] =~ /^\W*#{Regexp.escape(value.to_s)}/i
     end
     
+    def matches_id?(id)
+      @element[&quot;id&quot;] =~ /^\W*#{Regexp.escape(id.to_s)}/i
+    end
+    
     def matches_caption?(value)
       @element.innerHTML =~ /^\W*#{Regexp.escape(value.to_s)}/i
     end</diff>
      <filename>lib/webrat/field.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,6 +34,10 @@ module Webrat
       possible_buttons = fields_by_type([ButtonField])
       
       possible_buttons.each do |possible_button|
+        return possible_button if possible_button.matches_id?(value)
+      end
+      
+      possible_buttons.each do |possible_button|
         return possible_button if possible_button.matches_value?(value)
       end
       </diff>
      <filename>lib/webrat/form.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>20561b0c411c687cd755be381109937910fcda97</id>
    </parent>
  </parents>
  <author>
    <name>Gwyn Morfey</name>
    <email>gwyn@new-bamboo.co.uk</email>
  </author>
  <url>http://github.com/gwynm/webrat/commit/9e673539a5f8ed0f8aaec78dc8c5225612e8191e</url>
  <id>9e673539a5f8ed0f8aaec78dc8c5225612e8191e</id>
  <committed-date>2008-07-07T07:57:52-07:00</committed-date>
  <authored-date>2008-07-07T07:57:52-07:00</authored-date>
  <message>Now you can do clicks_button 'foo_123' (passing button ID, not value)</message>
  <tree>706444dc7bf362e854804a7bff75c510cf88a52d</tree>
  <committer>
    <name>Gwyn Morfey</name>
    <email>gwyn@new-bamboo.co.uk</email>
  </committer>
</commit>
