watir-webdriver 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,14 @@ module Watir
18
18
  raise UnknownFrameException, "wrapping a WebDriver element as a Frame is not currently supported"
19
19
  end
20
20
 
21
- @element = nil # we need to re-locate every time
21
+ if @element && !Watir.always_locate?
22
+ begin
23
+ @element.tag_name # rpc
24
+ return @element
25
+ rescue Selenium::WebDriver::Error::ObsoleteElementError
26
+ @element = nil # re-locate
27
+ end
28
+ end
22
29
 
23
30
  super
24
31
  end
@@ -48,14 +55,18 @@ module Watir
48
55
  private
49
56
 
50
57
  def locate_iframe
51
- # hack - Frame doesn't have IFrame's attributes either
52
- IFrame.new(@parent, @selector.merge(:tag_name => "iframe")).locate
58
+ locator = locator_class.new(@parent.wd, @selector.merge(:tag_name => "iframe"), attribute_list)
59
+ locator.locate
53
60
  end
54
61
 
55
62
  def locate_frame
56
- locator = locator_class.new(@parent.wd, @selector.merge(:tag_name => "frame"), self.class.attribute_list)
63
+ locator = locator_class.new(@parent.wd, @selector.merge(:tag_name => "frame"), attribute_list)
57
64
  locator.locate
58
65
  end
66
+
67
+ def attribute_list
68
+ self.class.attribute_list | IFrame.attribute_list
69
+ end
59
70
  end # Frame
60
71
 
61
72
  module Container
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,105 +1,100 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: watir-webdriver
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.2
4
5
  prerelease:
5
- version: 0.3.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Jari Bakken
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-08-13 00:00:00 +02:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-08-18 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: selenium-webdriver
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156945600 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
24
21
  version: 0.2.2
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2156945600
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &2156944980 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
29
+ requirements:
33
30
  - - ~>
34
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
35
32
  version: 2.3.0
36
33
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: yard
40
34
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2156944980
36
+ - !ruby/object:Gem::Dependency
37
+ name: yard
38
+ requirement: &2156944340 !ruby/object:Gem::Requirement
42
39
  none: false
43
- requirements:
40
+ requirements:
44
41
  - - ~>
45
- - !ruby/object:Gem::Version
46
- version: "0.6"
42
+ - !ruby/object:Gem::Version
43
+ version: '0.6'
47
44
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: webidl
51
45
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *2156944340
47
+ - !ruby/object:Gem::Dependency
48
+ name: webidl
49
+ requirement: &2156943720 !ruby/object:Gem::Requirement
53
50
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
57
54
  version: 0.1.1
58
55
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: sinatra
62
56
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *2156943720
58
+ - !ruby/object:Gem::Dependency
59
+ name: sinatra
60
+ requirement: &2156943120 !ruby/object:Gem::Requirement
64
61
  none: false
65
- requirements:
62
+ requirements:
66
63
  - - ~>
67
- - !ruby/object:Gem::Version
68
- version: "1.0"
64
+ - !ruby/object:Gem::Version
65
+ version: '1.0'
69
66
  type: :development
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: nokogiri
73
67
  prerelease: false
74
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *2156943120
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: &2156942580 !ruby/object:Gem::Requirement
75
72
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
80
77
  type: :development
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: activesupport
84
78
  prerelease: false
85
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *2156942580
80
+ - !ruby/object:Gem::Dependency
81
+ name: activesupport
82
+ requirement: &2156941880 !ruby/object:Gem::Requirement
86
83
  none: false
87
- requirements:
84
+ requirements:
88
85
  - - ~>
89
- - !ruby/object:Gem::Version
86
+ - !ruby/object:Gem::Version
90
87
  version: 2.3.5
91
88
  type: :development
92
- version_requirements: *id007
89
+ prerelease: false
90
+ version_requirements: *2156941880
93
91
  description: WebDriver-backed Watir
94
- email:
92
+ email:
95
93
  - jari.bakken@gmail.com
96
94
  executables: []
97
-
98
95
  extensions: []
99
-
100
96
  extra_rdoc_files: []
101
-
102
- files:
97
+ files:
103
98
  - .document
104
99
  - .gitignore
105
100
  - .gitmodules
@@ -177,35 +172,31 @@ files:
177
172
  - spec/wait_spec.rb
178
173
  - support/html5.html
179
174
  - watir-webdriver.gemspec
180
- has_rdoc: true
181
175
  homepage: http://github.com/jarib/watir-webdriver
182
176
  licenses: []
183
-
184
177
  post_install_message:
185
178
  rdoc_options: []
186
-
187
- require_paths:
179
+ require_paths:
188
180
  - lib
189
- required_ruby_version: !ruby/object:Gem::Requirement
181
+ required_ruby_version: !ruby/object:Gem::Requirement
190
182
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: "0"
195
- required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
188
  none: false
197
- requirements:
198
- - - ">="
199
- - !ruby/object:Gem::Version
200
- version: "0"
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
201
193
  requirements: []
202
-
203
194
  rubyforge_project: watir-webdriver
204
- rubygems_version: 1.5.3
195
+ rubygems_version: 1.8.8
205
196
  signing_key:
206
197
  specification_version: 3
207
198
  summary: Watir on WebDriver
208
- test_files:
199
+ test_files:
209
200
  - spec/alert_spec.rb
210
201
  - spec/browser_spec.rb
211
202
  - spec/container_spec.rb