spec/element_spec.rb in watir-webdriver-0.2.7 vs spec/element_spec.rb in watir-webdriver-0.2.8
- old
+ new
@@ -61,6 +61,16 @@
it 'returns false if the element does not exist' do
browser.div(:id, 'should-not-exist').should_not be_present
end
end
+ describe "#reset!" do
+ it "successfully relocates collection elements after a reset!" do
+ element = browser.divs(:id, 'foo').to_a.first
+ element.should_not be_nil
+
+ element.send :reset!
+ element.should exist
+ end
+ end
+
end