watir-webdriver 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,10 +21,6 @@ module Watir
21
21
  unless @selector.kind_of? Hash
22
22
  raise ArgumentError, "invalid argument: #{selector.inspect}"
23
23
  end
24
-
25
- if @selector.has_key?(:element)
26
- @element = @selector[:element]
27
- end
28
24
  end
29
25
 
30
26
  def exists?
@@ -250,7 +246,7 @@ module Watir
250
246
  protected
251
247
 
252
248
  def assert_exists
253
- @element ||= locate
249
+ @element ||= (@selector[:element] || locate)
254
250
 
255
251
  unless @element
256
252
  raise UnknownObjectException, "unable to locate element, using #{selector_string}"
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
@@ -63,4 +63,14 @@ describe Watir::Element do
63
63
  end
64
64
  end
65
65
 
66
+ describe "#reset!" do
67
+ it "successfully relocates collection elements after a reset!" do
68
+ element = browser.divs(:id, 'foo').to_a.first
69
+ element.should_not be_nil
70
+
71
+ element.send :reset!
72
+ element.should exist
73
+ end
74
+ end
75
+
66
76
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: watir-webdriver
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.7
5
+ version: 0.2.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken