<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -52,6 +52,11 @@ module Celerity
       @object = nil
     end
 
+    def ==(other)
+      return false unless other.kind_of? Element
+      xpath == other.xpath
+    end
+
     #
     # Get the parent element
     # @return [Celerity::Element, nil] subclass of Celerity::Element, or nil if no parent was found</diff>
      <filename>lib/celerity/element.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,4 +48,14 @@ describe &quot;Element&quot; do
     end
   end
 
+  describe &quot;#==&quot; do
+    it &quot;returns true if passed the same element&quot; do
+      browser.label(:id, 'first_label').should == browser.labels.first
+    end
+
+    it &quot;returns false if passed a different element&quot; do
+      browser.label(:id, 'first_label').should_not == browser.labels.last
+    end
+  end
+
 end</diff>
      <filename>spec/element_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce7a3d2c87ff97d9e22173239077e9cf797e7478</id>
    </parent>
  </parents>
  <author>
    <name>Jari Bakken</name>
    <email>jari.bakken@gmail.com</email>
  </author>
  <url>http://github.com/jarib/celerity/commit/a6a09161ab1536104d523a3103f3a7c039a992c1</url>
  <id>a6a09161ab1536104d523a3103f3a7c039a992c1</id>
  <committed-date>2009-10-28T17:47:18-07:00</committed-date>
  <authored-date>2009-10-28T17:47:18-07:00</authored-date>
  <message>Use Element#xpath for element equality. Closes #11.</message>
  <tree>ce2c96af43da398b30267bad9eed4dfbc74a190d</tree>
  <committer>
    <name>Jari Bakken</name>
    <email>jari.bakken@gmail.com</email>
  </committer>
</commit>
