poltergeist 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/LICENSE +1 -1
- data/README.md +15 -44
- data/lib/capybara/poltergeist/browser.rb +58 -10
- data/lib/capybara/poltergeist/client.rb +2 -2
- data/lib/capybara/poltergeist/client/agent.coffee +46 -10
- data/lib/capybara/poltergeist/client/browser.coffee +160 -117
- data/lib/capybara/poltergeist/client/compiled/agent.js +60 -10
- data/lib/capybara/poltergeist/client/compiled/browser.js +208 -137
- data/lib/capybara/poltergeist/client/compiled/main.js +40 -2
- data/lib/capybara/poltergeist/client/compiled/node.js +7 -2
- data/lib/capybara/poltergeist/client/compiled/web_page.js +172 -111
- data/lib/capybara/poltergeist/client/main.coffee +10 -1
- data/lib/capybara/poltergeist/client/node.coffee +8 -4
- data/lib/capybara/poltergeist/client/web_page.coffee +139 -94
- data/lib/capybara/poltergeist/driver.rb +36 -2
- data/lib/capybara/poltergeist/errors.rb +8 -2
- data/lib/capybara/poltergeist/inspector.rb +1 -1
- data/lib/capybara/poltergeist/network_traffic/response.rb +1 -1
- data/lib/capybara/poltergeist/node.rb +12 -0
- data/lib/capybara/poltergeist/version.rb +1 -1
- metadata +44 -31
@@ -1,7 +1,7 @@
|
|
1
1
|
module Capybara
|
2
2
|
module Poltergeist
|
3
|
-
class Error < StandardError
|
4
|
-
end
|
3
|
+
class Error < StandardError; end
|
4
|
+
class NoSuchWindowError < Error; end
|
5
5
|
|
6
6
|
class ClientError < Error
|
7
7
|
attr_reader :response
|
@@ -54,6 +54,12 @@ module Capybara
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
class StatusFailError < ClientError
|
58
|
+
def message
|
59
|
+
"Request failed to reach server, check DNS and/or server status"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
57
63
|
class FrameNotFound < ClientError
|
58
64
|
def name
|
59
65
|
response['args'].first
|
@@ -26,6 +26,10 @@ module Capybara::Poltergeist
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
def parents
|
30
|
+
command(:parents).map { |parent_id| self.class.new(driver, page_id, parent_id) }
|
31
|
+
end
|
32
|
+
|
29
33
|
def find(method, selector)
|
30
34
|
command(:find_within, method, selector).map { |id| self.class.new(driver, page_id, id) }
|
31
35
|
end
|
@@ -50,6 +54,10 @@ module Capybara::Poltergeist
|
|
50
54
|
command :attribute, name
|
51
55
|
end
|
52
56
|
|
57
|
+
def attributes
|
58
|
+
command :attributes
|
59
|
+
end
|
60
|
+
|
53
61
|
def value
|
54
62
|
command :value
|
55
63
|
end
|
@@ -108,6 +116,10 @@ module Capybara::Poltergeist
|
|
108
116
|
command :click
|
109
117
|
end
|
110
118
|
|
119
|
+
def right_click
|
120
|
+
command :right_click
|
121
|
+
end
|
122
|
+
|
111
123
|
def double_click
|
112
124
|
command :double_click
|
113
125
|
end
|
metadata
CHANGED
@@ -1,181 +1,195 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poltergeist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: websocket-driver
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: multi_json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: cliver
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.3.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.3.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: launchy
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - ~>
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '2.12'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - ~>
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '2.12'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: sinatra
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - ~>
|
101
|
+
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '1.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - ~>
|
108
|
+
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '1.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - ~>
|
115
|
+
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '10.0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - ~>
|
122
|
+
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '10.0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: image_size
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - ~>
|
129
|
+
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '1.0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - ~>
|
136
|
+
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '1.0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: pdf-reader
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - ~>
|
143
|
+
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: 1.3.3
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - ~>
|
150
|
+
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: 1.3.3
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: coffee-script
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- - ~>
|
157
|
+
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: 2.2.0
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- - ~>
|
164
|
+
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: 2.2.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: guard-coffeescript
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - ~>
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: 1.0.0
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - ~>
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: 1.0.0
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: rspec-rerun
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- - ~>
|
185
|
+
- - "~>"
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0.1'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- - ~>
|
192
|
+
- - "~>"
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0.1'
|
181
195
|
description: Poltergeist is a driver for Capybara that allows you to run your tests
|
@@ -216,7 +230,7 @@ files:
|
|
216
230
|
- lib/capybara/poltergeist/utility.rb
|
217
231
|
- lib/capybara/poltergeist/version.rb
|
218
232
|
- lib/capybara/poltergeist/web_socket_server.rb
|
219
|
-
homepage: http://github.com/
|
233
|
+
homepage: http://github.com/teampoltergeist/poltergeist
|
220
234
|
licenses:
|
221
235
|
- MIT
|
222
236
|
metadata: {}
|
@@ -226,19 +240,18 @@ require_paths:
|
|
226
240
|
- lib
|
227
241
|
required_ruby_version: !ruby/object:Gem::Requirement
|
228
242
|
requirements:
|
229
|
-
- -
|
243
|
+
- - ">="
|
230
244
|
- !ruby/object:Gem::Version
|
231
245
|
version: 1.9.3
|
232
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
|
-
- -
|
248
|
+
- - ">="
|
235
249
|
- !ruby/object:Gem::Version
|
236
250
|
version: '0'
|
237
251
|
requirements: []
|
238
252
|
rubyforge_project:
|
239
|
-
rubygems_version: 2.
|
253
|
+
rubygems_version: 2.4.5
|
240
254
|
signing_key:
|
241
255
|
specification_version: 4
|
242
256
|
summary: PhantomJS driver for Capybara
|
243
257
|
test_files: []
|
244
|
-
has_rdoc:
|