watir-webdriver 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +8 -0
- data/Rakefile +6 -6
- data/lib/watir-webdriver/browser.rb +1 -1
- data/lib/watir-webdriver/elements/element.rb +6 -6
- data/lib/watir-webdriver/locators/text_field_locator.rb +1 -1
- data/lib/watir-webdriver/version.rb +1 -1
- data/spec/implementation.rb +1 -1
- data/spec/spec_helper.rb +8 -0
- data/watir-webdriver.gemspec +3 -0
- metadata +165 -68
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Rakefile
CHANGED
@@ -4,8 +4,9 @@ Bundler::GemHelper.install_tasks
|
|
4
4
|
|
5
5
|
require 'rspec/core/rake_task'
|
6
6
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
7
|
-
spec.ruby_opts
|
8
|
-
spec.
|
7
|
+
spec.ruby_opts = "-I lib:spec"
|
8
|
+
spec.rspec_opts = %w[--color --require fuubar --format Fuubar]
|
9
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
9
10
|
end
|
10
11
|
|
11
12
|
namespace :spec do
|
@@ -14,10 +15,11 @@ namespace :spec do
|
|
14
15
|
spec.pattern = 'spec/**/*_spec.rb'
|
15
16
|
spec.rspec_opts = "--format html --out #{ENV["SPEC_REPORT"] || "specs.html"}"
|
16
17
|
end
|
17
|
-
|
18
18
|
end
|
19
19
|
|
20
|
-
task :spec
|
20
|
+
task :default => :spec
|
21
|
+
|
22
|
+
|
21
23
|
|
22
24
|
task :lib do
|
23
25
|
$LOAD_PATH.unshift(File.expand_path("lib", File.dirname(__FILE__)))
|
@@ -86,8 +88,6 @@ namespace :html5 do
|
|
86
88
|
task :update => [:download, :generate, :overwrite]
|
87
89
|
end # html5
|
88
90
|
|
89
|
-
task :default => :spec
|
90
|
-
|
91
91
|
begin
|
92
92
|
require 'yard'
|
93
93
|
Rake::Task[:lib].invoke
|
@@ -71,22 +71,22 @@ module Watir
|
|
71
71
|
def double_click
|
72
72
|
assert_exists
|
73
73
|
|
74
|
-
unless driver.
|
75
|
-
raise NotImplementedError, "
|
74
|
+
unless driver.kind_of? WebDriver::DriverExtensions::HasInputDevices
|
75
|
+
raise NotImplementedError, "Element#double_click is not supported by this driver"
|
76
76
|
end
|
77
77
|
|
78
|
-
driver.
|
78
|
+
driver.action.double_click(@element).perform
|
79
79
|
run_checkers
|
80
80
|
end
|
81
81
|
|
82
82
|
def right_click
|
83
83
|
assert_exists
|
84
84
|
|
85
|
-
unless driver.
|
86
|
-
raise NotImplementedError, "
|
85
|
+
unless driver.kind_of? WebDriver::DriverExtensions::HasInputDevices
|
86
|
+
raise NotImplementedError, "Element#context_click is not supported by this driver"
|
87
87
|
end
|
88
88
|
|
89
|
-
driver.
|
89
|
+
driver.action.context_click(@element).perform
|
90
90
|
run_checkers
|
91
91
|
end
|
92
92
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Watir
|
2
2
|
class TextFieldLocator < ElementLocator
|
3
3
|
|
4
|
-
NON_TEXT_TYPES = %w[file radio checkbox submit reset image button hidden
|
4
|
+
NON_TEXT_TYPES = %w[file radio checkbox submit reset image button hidden datetime date month week time datetime-local range color]
|
5
5
|
# TODO: better way of finding input text fields?
|
6
6
|
NEGATIVE_TYPE_EXPR = NON_TEXT_TYPES.map { |t| "@type!=#{t.inspect}" }.join(" and ")
|
7
7
|
|
data/spec/implementation.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -19,3 +19,11 @@ include Watir::Exception
|
|
19
19
|
|
20
20
|
WEBDRIVER_SELECTORS = [:class, :class_name, :css, :id, :name, :tag_name, :xpath]
|
21
21
|
|
22
|
+
if ENV['TRAVIS']
|
23
|
+
require 'headless'
|
24
|
+
display = Headless.new
|
25
|
+
display.start
|
26
|
+
|
27
|
+
pid = Process.pid
|
28
|
+
at_exit { display.stop if Process.pid == pid }
|
29
|
+
end
|
data/watir-webdriver.gemspec
CHANGED
@@ -25,6 +25,9 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency "yard", "~> 0.6"
|
26
26
|
s.add_development_dependency "webidl", ">= 0.1.1"
|
27
27
|
s.add_development_dependency "sinatra", "~> 1.0"
|
28
|
+
s.add_development_dependency "headless", "~> 0.2"
|
29
|
+
s.add_development_dependency "rake", "~> 0.9.2"
|
30
|
+
s.add_development_dependency "fuubar", "~> 0.0.6"
|
28
31
|
s.add_development_dependency "nokogiri"
|
29
32
|
s.add_development_dependency "activesupport", "~> 2.3.5" # for pluralization during code generation
|
30
33
|
end
|
metadata
CHANGED
@@ -1,103 +1,191 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir-webdriver
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Jari Bakken
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-09-08 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: selenium-webdriver
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 19
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 2
|
32
|
+
- 2
|
21
33
|
version: 0.2.2
|
22
34
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
26
37
|
name: rspec
|
27
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
41
|
+
requirements:
|
30
42
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 2
|
47
|
+
- 3
|
48
|
+
- 0
|
32
49
|
version: 2.3.0
|
33
50
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
37
53
|
name: yard
|
38
|
-
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
56
|
none: false
|
40
|
-
requirements:
|
57
|
+
requirements:
|
41
58
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 7
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 6
|
64
|
+
version: "0.6"
|
44
65
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
48
68
|
name: webidl
|
49
|
-
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
71
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 25
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
- 1
|
79
|
+
- 1
|
54
80
|
version: 0.1.1
|
55
81
|
type: :development
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
59
84
|
name: sinatra
|
60
|
-
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
87
|
none: false
|
62
|
-
requirements:
|
88
|
+
requirements:
|
63
89
|
- - ~>
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 15
|
92
|
+
segments:
|
93
|
+
- 1
|
94
|
+
- 0
|
95
|
+
version: "1.0"
|
66
96
|
type: :development
|
97
|
+
version_requirements: *id005
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: headless
|
67
100
|
prerelease: false
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ~>
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
hash: 15
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
- 2
|
110
|
+
version: "0.2"
|
111
|
+
type: :development
|
112
|
+
version_requirements: *id006
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rake
|
115
|
+
prerelease: false
|
116
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ~>
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
hash: 63
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
- 9
|
125
|
+
- 2
|
126
|
+
version: 0.9.2
|
127
|
+
type: :development
|
128
|
+
version_requirements: *id007
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: fuubar
|
131
|
+
prerelease: false
|
132
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
72
133
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
134
|
+
requirements:
|
135
|
+
- - ~>
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
hash: 19
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
- 0
|
141
|
+
- 6
|
142
|
+
version: 0.0.6
|
77
143
|
type: :development
|
144
|
+
version_requirements: *id008
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: nokogiri
|
78
147
|
prerelease: false
|
79
|
-
|
80
|
-
|
148
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
type: :development
|
158
|
+
version_requirements: *id009
|
159
|
+
- !ruby/object:Gem::Dependency
|
81
160
|
name: activesupport
|
82
|
-
|
161
|
+
prerelease: false
|
162
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
83
163
|
none: false
|
84
|
-
requirements:
|
164
|
+
requirements:
|
85
165
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 9
|
168
|
+
segments:
|
169
|
+
- 2
|
170
|
+
- 3
|
171
|
+
- 5
|
87
172
|
version: 2.3.5
|
88
173
|
type: :development
|
89
|
-
|
90
|
-
version_requirements: *2156941880
|
174
|
+
version_requirements: *id010
|
91
175
|
description: WebDriver-backed Watir
|
92
|
-
email:
|
176
|
+
email:
|
93
177
|
- jari.bakken@gmail.com
|
94
178
|
executables: []
|
179
|
+
|
95
180
|
extensions: []
|
181
|
+
|
96
182
|
extra_rdoc_files: []
|
97
|
-
|
183
|
+
|
184
|
+
files:
|
98
185
|
- .document
|
99
186
|
- .gitignore
|
100
187
|
- .gitmodules
|
188
|
+
- .travis.yml
|
101
189
|
- Gemfile
|
102
190
|
- LICENSE
|
103
191
|
- README.md
|
@@ -174,29 +262,38 @@ files:
|
|
174
262
|
- watir-webdriver.gemspec
|
175
263
|
homepage: http://github.com/jarib/watir-webdriver
|
176
264
|
licenses: []
|
265
|
+
|
177
266
|
post_install_message:
|
178
267
|
rdoc_options: []
|
179
|
-
|
268
|
+
|
269
|
+
require_paths:
|
180
270
|
- lib
|
181
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
271
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
182
272
|
none: false
|
183
|
-
requirements:
|
184
|
-
- -
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
|
187
|
-
|
273
|
+
requirements:
|
274
|
+
- - ">="
|
275
|
+
- !ruby/object:Gem::Version
|
276
|
+
hash: 3
|
277
|
+
segments:
|
278
|
+
- 0
|
279
|
+
version: "0"
|
280
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
281
|
none: false
|
189
|
-
requirements:
|
190
|
-
- -
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
hash: 3
|
286
|
+
segments:
|
287
|
+
- 0
|
288
|
+
version: "0"
|
193
289
|
requirements: []
|
290
|
+
|
194
291
|
rubyforge_project: watir-webdriver
|
195
|
-
rubygems_version: 1.8.
|
292
|
+
rubygems_version: 1.8.9
|
196
293
|
signing_key:
|
197
294
|
specification_version: 3
|
198
295
|
summary: Watir on WebDriver
|
199
|
-
test_files:
|
296
|
+
test_files:
|
200
297
|
- spec/alert_spec.rb
|
201
298
|
- spec/browser_spec.rb
|
202
299
|
- spec/container_spec.rb
|