hirobumi-celerity 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +42 -0
- data/License.txt +621 -0
- data/README.txt +68 -0
- data/Rakefile +12 -0
- data/lib/celerity.rb +59 -0
- data/lib/celerity/browser.rb +454 -0
- data/lib/celerity/clickable_element.rb +26 -0
- data/lib/celerity/collections.rb +148 -0
- data/lib/celerity/container.rb +488 -0
- data/lib/celerity/default_viewer.rb +10 -0
- data/lib/celerity/disabled_element.rb +27 -0
- data/lib/celerity/element.rb +241 -0
- data/lib/celerity/element_collections.rb +68 -0
- data/lib/celerity/element_locator.rb +167 -0
- data/lib/celerity/elements/button.rb +34 -0
- data/lib/celerity/elements/file_field.rb +17 -0
- data/lib/celerity/elements/form.rb +16 -0
- data/lib/celerity/elements/frame.rb +53 -0
- data/lib/celerity/elements/image.rb +57 -0
- data/lib/celerity/elements/label.rb +9 -0
- data/lib/celerity/elements/link.rb +12 -0
- data/lib/celerity/elements/meta.rb +6 -0
- data/lib/celerity/elements/non_control_elements.rb +93 -0
- data/lib/celerity/elements/option.rb +18 -0
- data/lib/celerity/elements/radio_check.rb +85 -0
- data/lib/celerity/elements/select_list.rb +81 -0
- data/lib/celerity/elements/table.rb +117 -0
- data/lib/celerity/elements/table_cell.rb +28 -0
- data/lib/celerity/elements/table_elements.rb +41 -0
- data/lib/celerity/elements/table_row.rb +36 -0
- data/lib/celerity/elements/text_field.rb +127 -0
- data/lib/celerity/exception.rb +40 -0
- data/lib/celerity/extra/method_generator.rb +158 -0
- data/lib/celerity/htmlunit.rb +41 -0
- data/lib/celerity/htmlunit/commons-codec-1.3.jar +0 -0
- data/lib/celerity/htmlunit/commons-collections-3.2.1.jar +0 -0
- data/lib/celerity/htmlunit/commons-httpclient-3.1.jar +0 -0
- data/lib/celerity/htmlunit/commons-io-1.4.jar +0 -0
- data/lib/celerity/htmlunit/commons-lang-2.4.jar +0 -0
- data/lib/celerity/htmlunit/commons-logging-1.1.1.jar +0 -0
- data/lib/celerity/htmlunit/cssparser-0.9.5.jar +0 -0
- data/lib/celerity/htmlunit/htmlunit-2.4.jar +0 -0
- data/lib/celerity/htmlunit/htmlunit-core-js-2.4.jar +0 -0
- data/lib/celerity/htmlunit/nekohtml-1.9.11.jar +0 -0
- data/lib/celerity/htmlunit/sac-1.3.jar +0 -0
- data/lib/celerity/htmlunit/serializer-2.7.1.jar +0 -0
- data/lib/celerity/htmlunit/xalan-2.7.1.jar +0 -0
- data/lib/celerity/htmlunit/xercesImpl-2.8.1.jar +0 -0
- data/lib/celerity/htmlunit/xml-apis-1.3.04.jar +0 -0
- data/lib/celerity/identifier.rb +11 -0
- data/lib/celerity/input_element.rb +25 -0
- data/lib/celerity/listener.rb +106 -0
- data/lib/celerity/resources/no_viewer.png +0 -0
- data/lib/celerity/util.rb +79 -0
- data/lib/celerity/version.rb +9 -0
- data/lib/celerity/watir_compatibility.rb +85 -0
- data/tasks/benchmark.rake +4 -0
- data/tasks/deployment.rake +43 -0
- data/tasks/environment.rake +7 -0
- data/tasks/fix.rake +25 -0
- data/tasks/jar.rake +57 -0
- data/tasks/rdoc.rake +4 -0
- data/tasks/rspec.rake +30 -0
- data/tasks/simple_ci.rake +94 -0
- data/tasks/snapshot.rake +26 -0
- data/tasks/specserver.rake +21 -0
- data/tasks/website.rake +17 -0
- data/tasks/yard.rake +5 -0
- metadata +129 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
module Celerity
|
2
|
+
module ClickableElement
|
3
|
+
|
4
|
+
# clicks the element
|
5
|
+
def click
|
6
|
+
assert_exists
|
7
|
+
assert_enabled if respond_to?(:assert_enabled)
|
8
|
+
|
9
|
+
@container.update_page(@object.click)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Click the element and return a new Browser instance with the resulting page.
|
13
|
+
# This is useful for elements that trigger popups when clicked.
|
14
|
+
#
|
15
|
+
# @return [Celerity::Browser]
|
16
|
+
def click_and_attach
|
17
|
+
assert_exists
|
18
|
+
assert_enabled if respond_to?(:assert_enabled)
|
19
|
+
|
20
|
+
browser = Browser.new
|
21
|
+
browser.update_page(@object.click)
|
22
|
+
|
23
|
+
browser
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
module Celerity
|
2
|
+
|
3
|
+
class Frames < ElementCollections
|
4
|
+
def element_class; Frame; end
|
5
|
+
end
|
6
|
+
|
7
|
+
class Buttons < ElementCollections
|
8
|
+
def element_class; Button; end
|
9
|
+
end
|
10
|
+
|
11
|
+
class FileFields < ElementCollections
|
12
|
+
def element_class; FileField; end
|
13
|
+
end
|
14
|
+
|
15
|
+
class CheckBoxes < ElementCollections
|
16
|
+
def element_class; CheckBox; end
|
17
|
+
end
|
18
|
+
|
19
|
+
class Radios < ElementCollections
|
20
|
+
def element_class; Radio; end
|
21
|
+
end
|
22
|
+
|
23
|
+
class SelectLists < ElementCollections
|
24
|
+
def element_class; SelectList; end
|
25
|
+
end
|
26
|
+
|
27
|
+
class Links < ElementCollections
|
28
|
+
def element_class; Link; end
|
29
|
+
end
|
30
|
+
|
31
|
+
class Uls < ElementCollections
|
32
|
+
def element_class; Ul; end
|
33
|
+
end
|
34
|
+
|
35
|
+
class Ols < ElementCollections
|
36
|
+
def element_class; Ol; end
|
37
|
+
end
|
38
|
+
|
39
|
+
class Lis < ElementCollections
|
40
|
+
def element_class; Li; end
|
41
|
+
end
|
42
|
+
|
43
|
+
class Dds < ElementCollections
|
44
|
+
def element_class; Dd; end
|
45
|
+
end
|
46
|
+
|
47
|
+
class Dls < ElementCollections
|
48
|
+
def element_class; Dl; end
|
49
|
+
end
|
50
|
+
|
51
|
+
class Dts < ElementCollections
|
52
|
+
def element_class; Dt; end
|
53
|
+
end
|
54
|
+
|
55
|
+
class Maps < ElementCollections
|
56
|
+
def element_class; Map; end
|
57
|
+
end
|
58
|
+
|
59
|
+
class Areas < ElementCollections
|
60
|
+
def element_class; Area; end
|
61
|
+
end
|
62
|
+
|
63
|
+
class Images < ElementCollections
|
64
|
+
def element_class; Image; end
|
65
|
+
end
|
66
|
+
|
67
|
+
class TextFields < ElementCollections
|
68
|
+
def element_class; TextField; end
|
69
|
+
end
|
70
|
+
|
71
|
+
class Hiddens < ElementCollections
|
72
|
+
def element_class; Hidden; end
|
73
|
+
end
|
74
|
+
|
75
|
+
class Tables < ElementCollections
|
76
|
+
def element_class; Table; end
|
77
|
+
end
|
78
|
+
|
79
|
+
class TableHeaders < ElementCollections
|
80
|
+
def element_class; TableHeader; end
|
81
|
+
end
|
82
|
+
class TableBodies < ElementCollections
|
83
|
+
def element_class; TableBody; end
|
84
|
+
end
|
85
|
+
class TableFooters < ElementCollections
|
86
|
+
def element_class; TableFooter; end
|
87
|
+
end
|
88
|
+
|
89
|
+
class TableRows < ElementCollections
|
90
|
+
def element_class; TableRow; end
|
91
|
+
end
|
92
|
+
|
93
|
+
class TableCells < ElementCollections
|
94
|
+
def element_class; TableCell; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class Labels < ElementCollections
|
98
|
+
def element_class; Label; end
|
99
|
+
end
|
100
|
+
|
101
|
+
class Pres < ElementCollections
|
102
|
+
def element_class; Pre; end
|
103
|
+
end
|
104
|
+
|
105
|
+
class Ps < ElementCollections
|
106
|
+
def element_class; P; end
|
107
|
+
end
|
108
|
+
|
109
|
+
class Spans < ElementCollections
|
110
|
+
def element_class; Span; end
|
111
|
+
end
|
112
|
+
|
113
|
+
class Divs < ElementCollections
|
114
|
+
def element_class; Div; end
|
115
|
+
end
|
116
|
+
|
117
|
+
class Forms < ElementCollections
|
118
|
+
def element_class; Form; end
|
119
|
+
end
|
120
|
+
|
121
|
+
class Options < ElementCollections
|
122
|
+
def element_class; Option; end
|
123
|
+
end
|
124
|
+
|
125
|
+
class Metas < ElementCollections
|
126
|
+
def element_class; Meta; end
|
127
|
+
end
|
128
|
+
|
129
|
+
class H1s < ElementCollections
|
130
|
+
def element_class; H1; end
|
131
|
+
end
|
132
|
+
class H2s < ElementCollections
|
133
|
+
def element_class; H2; end
|
134
|
+
end
|
135
|
+
class H3s < ElementCollections
|
136
|
+
def element_class; H3; end
|
137
|
+
end
|
138
|
+
class H4s < ElementCollections
|
139
|
+
def element_class; H4; end
|
140
|
+
end
|
141
|
+
class H5s < ElementCollections
|
142
|
+
def element_class; H5; end
|
143
|
+
end
|
144
|
+
class H6s < ElementCollections
|
145
|
+
def element_class; H6; end
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
@@ -0,0 +1,488 @@
|
|
1
|
+
module Celerity
|
2
|
+
|
3
|
+
# This class contains methods for accessing elements inside a container,
|
4
|
+
# usually the Browser object, meaning the current page.
|
5
|
+
# The most common syntax is
|
6
|
+
# browser.elem(:attribute, 'value')
|
7
|
+
#
|
8
|
+
# Note that the element is located lazily, so no exceptions will be raised
|
9
|
+
# if the element doesn't exist until you call a method on the resulting object.
|
10
|
+
# To do this you would normally use Element#exists? or an action method,
|
11
|
+
# like ClickableElement#click.
|
12
|
+
# You can also pass in a hash:
|
13
|
+
#
|
14
|
+
# browser.link(:index => 1).click
|
15
|
+
#
|
16
|
+
# All elements support multiple attributes identification using the
|
17
|
+
# hash syntax (though this might not always be compatible with Watir):
|
18
|
+
#
|
19
|
+
# browser.span(:class_name => 'product', :index => 5).text
|
20
|
+
#
|
21
|
+
# Checkboxes and radio buttons support a special three-argument syntax:
|
22
|
+
#
|
23
|
+
# browser.check_box(:name, 'a_name', '1234').set
|
24
|
+
#
|
25
|
+
# You can also get all the elements of a certain type by using the plural form (@see Celerity::ElementCollections):
|
26
|
+
#
|
27
|
+
# browser.links # => #<Celerity::Links:0x7a1c2da2 ...>
|
28
|
+
#
|
29
|
+
module Container
|
30
|
+
include Celerity::Exception
|
31
|
+
|
32
|
+
# Points back to the Browser instance that contains this element
|
33
|
+
attr_reader :browser
|
34
|
+
|
35
|
+
|
36
|
+
# Check if the element contains the given text.
|
37
|
+
#
|
38
|
+
# @param [String, Regexp] expected_text The text to look for.
|
39
|
+
# @return [Fixnum, nil] The index of the matched text, or nil if it doesn't match.
|
40
|
+
def contains_text(expected_text)
|
41
|
+
assert_exists
|
42
|
+
return nil unless respond_to? :text
|
43
|
+
|
44
|
+
case expected_text
|
45
|
+
when Regexp
|
46
|
+
text() =~ expected_text
|
47
|
+
when String
|
48
|
+
text().index(expected_text)
|
49
|
+
else
|
50
|
+
raise TypeError, "expected String or Regexp, got #{expected_text.inspect}:#{expected_text.class}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Used internally to update the container object.
|
55
|
+
# @api private
|
56
|
+
def container=(container)
|
57
|
+
@container = container
|
58
|
+
@browser = container.browser
|
59
|
+
container
|
60
|
+
end
|
61
|
+
|
62
|
+
# Used internally to update the page object.
|
63
|
+
# @api private
|
64
|
+
def update_page(page)
|
65
|
+
@browser.page = page
|
66
|
+
end
|
67
|
+
|
68
|
+
# Used internally.
|
69
|
+
#
|
70
|
+
# @param [String] string The string to match against.
|
71
|
+
# @param [Regexp, String, #to_s] what The match we're looking for.
|
72
|
+
# @return [MatchData, true, false, nil]
|
73
|
+
#
|
74
|
+
# @api private
|
75
|
+
def matches?(string, what)
|
76
|
+
Regexp === what ? string =~ what : string == what.to_s
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# below methods sorted alphabetically
|
81
|
+
#
|
82
|
+
|
83
|
+
# @return [Celerity::Area]
|
84
|
+
def area(*args)
|
85
|
+
Area.new(self, *args)
|
86
|
+
end
|
87
|
+
|
88
|
+
# @return [Celerity::Areas]
|
89
|
+
def areas
|
90
|
+
Areas.new(self)
|
91
|
+
end
|
92
|
+
|
93
|
+
# @return [Celerity::Button]
|
94
|
+
def button(*args)
|
95
|
+
Button.new(self, *args)
|
96
|
+
end
|
97
|
+
|
98
|
+
# @return [Celerity::Buttons]
|
99
|
+
def buttons
|
100
|
+
Buttons.new(self)
|
101
|
+
end
|
102
|
+
|
103
|
+
# @return [Celerity::TableCell]
|
104
|
+
def cell(*args)
|
105
|
+
TableCell.new(self, *args)
|
106
|
+
end
|
107
|
+
|
108
|
+
# @return [Celerity::TableCells]
|
109
|
+
def cells
|
110
|
+
TableCells.new(self)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Since finding checkboxes by value is very common, you can use this shorthand:
|
114
|
+
#
|
115
|
+
# browser.check_box(:name, 'a_name', '1234').set
|
116
|
+
#
|
117
|
+
# or
|
118
|
+
#
|
119
|
+
# browser.check_box(:name => 'a_name', :value => '1234').set
|
120
|
+
#
|
121
|
+
# @return [Celerity::CheckBox]
|
122
|
+
def check_box(*args)
|
123
|
+
CheckBox.new(self, *args)
|
124
|
+
end
|
125
|
+
|
126
|
+
# @return [Celerity::CheckBoxes]
|
127
|
+
def checkboxes
|
128
|
+
CheckBoxes.new(self)
|
129
|
+
end
|
130
|
+
|
131
|
+
# @return [Celerity::Dd]
|
132
|
+
def dd(*args)
|
133
|
+
Dd.new(self, *args)
|
134
|
+
end
|
135
|
+
|
136
|
+
# @return [Celerity::Dds]
|
137
|
+
def dds
|
138
|
+
Dds.new(self)
|
139
|
+
end
|
140
|
+
|
141
|
+
# @return [Celerity::Div]
|
142
|
+
def div(*args)
|
143
|
+
Div.new(self, *args)
|
144
|
+
end
|
145
|
+
|
146
|
+
# @return [Celerity::Divs]
|
147
|
+
def divs
|
148
|
+
Divs.new(self)
|
149
|
+
end
|
150
|
+
|
151
|
+
# @return [Celerity::Dl]
|
152
|
+
def dl(*args)
|
153
|
+
Dl.new(self, *args)
|
154
|
+
end
|
155
|
+
|
156
|
+
# @return [Celerity::Dls]
|
157
|
+
def dls
|
158
|
+
Dls.new(self)
|
159
|
+
end
|
160
|
+
|
161
|
+
# @return [Celerity::Dt]
|
162
|
+
def dt(*args)
|
163
|
+
Dt.new(self, *args)
|
164
|
+
end
|
165
|
+
|
166
|
+
# @return [Celerity::Dts]
|
167
|
+
def dts
|
168
|
+
Dts.new(self)
|
169
|
+
end
|
170
|
+
|
171
|
+
# @return [Celerity::FileField]
|
172
|
+
def file_field(*args)
|
173
|
+
FileField.new(self, *args)
|
174
|
+
end
|
175
|
+
|
176
|
+
# @return [Celerity::FileFields]
|
177
|
+
def file_fields
|
178
|
+
FileFields.new(self)
|
179
|
+
end
|
180
|
+
|
181
|
+
# @return [Celerity::Form]
|
182
|
+
def form(*args)
|
183
|
+
Form.new(self, *args)
|
184
|
+
end
|
185
|
+
|
186
|
+
# @return [Celerity::Forms]
|
187
|
+
def forms
|
188
|
+
Forms.new(self)
|
189
|
+
end
|
190
|
+
|
191
|
+
# @return [Celerity::Frame]
|
192
|
+
def frame(*args)
|
193
|
+
Frame.new(self, *args)
|
194
|
+
end
|
195
|
+
|
196
|
+
# @return [Celerity::Frames]
|
197
|
+
def frames
|
198
|
+
Frames.new(self)
|
199
|
+
end
|
200
|
+
|
201
|
+
# @return [Celerity::H1]
|
202
|
+
def h1(*args)
|
203
|
+
H1.new(self, *args)
|
204
|
+
end
|
205
|
+
|
206
|
+
# @return [Celerity::H1s]
|
207
|
+
def h1s
|
208
|
+
H1s.new(self)
|
209
|
+
end
|
210
|
+
|
211
|
+
# @return [Celerity::H2]
|
212
|
+
def h2(*args)
|
213
|
+
H2.new(self, *args)
|
214
|
+
end
|
215
|
+
|
216
|
+
# @return [Celerity::H2s]
|
217
|
+
def h2s
|
218
|
+
H2s.new(self)
|
219
|
+
end
|
220
|
+
|
221
|
+
# @return [Celerity::H3]
|
222
|
+
def h3(*args)
|
223
|
+
H3.new(self, *args)
|
224
|
+
end
|
225
|
+
|
226
|
+
# @return [Celerity::H3s]
|
227
|
+
def h3s
|
228
|
+
H3s.new(self)
|
229
|
+
end
|
230
|
+
|
231
|
+
# @return [Celerity::H4]
|
232
|
+
def h4(*args)
|
233
|
+
H4.new(self, *args)
|
234
|
+
end
|
235
|
+
|
236
|
+
# @return [Celerity::H4s]
|
237
|
+
def h4s
|
238
|
+
H4s.new(self)
|
239
|
+
end
|
240
|
+
|
241
|
+
# @return [Celerity::H5]
|
242
|
+
def h5(*args)
|
243
|
+
H5.new(self, *args)
|
244
|
+
end
|
245
|
+
|
246
|
+
# @return [Celerity::H5s]
|
247
|
+
def h5s
|
248
|
+
H5s.new(self)
|
249
|
+
end
|
250
|
+
|
251
|
+
# @return [Celerity::H6]
|
252
|
+
def h6(*args)
|
253
|
+
H6.new(self, *args)
|
254
|
+
end
|
255
|
+
|
256
|
+
# @return [Celerity::H6s]
|
257
|
+
def h6s
|
258
|
+
H6s.new(self)
|
259
|
+
end
|
260
|
+
|
261
|
+
# @return [Celerity::Hidden]
|
262
|
+
def hidden(*args)
|
263
|
+
Hidden.new(self, *args)
|
264
|
+
end
|
265
|
+
|
266
|
+
# @return [Celerity::Hiddens]
|
267
|
+
def hiddens
|
268
|
+
Hiddens.new(self)
|
269
|
+
end
|
270
|
+
|
271
|
+
# @return [Celerity::Image]
|
272
|
+
def image(*args)
|
273
|
+
Image.new(self, *args)
|
274
|
+
end
|
275
|
+
|
276
|
+
# @return [Celerity::Images]
|
277
|
+
def images
|
278
|
+
Images.new(self)
|
279
|
+
end
|
280
|
+
|
281
|
+
# @return [Celerity::Label]
|
282
|
+
def label(*args)
|
283
|
+
Label.new(self, *args)
|
284
|
+
end
|
285
|
+
|
286
|
+
# @return [Celerity::Labels]
|
287
|
+
def labels
|
288
|
+
Labels.new(self)
|
289
|
+
end
|
290
|
+
|
291
|
+
# @return [Celerity::Li]
|
292
|
+
def li(*args)
|
293
|
+
Li.new(self, *args)
|
294
|
+
end
|
295
|
+
|
296
|
+
# @return [Celerity::Lis]
|
297
|
+
def lis
|
298
|
+
Lis.new(self)
|
299
|
+
end
|
300
|
+
|
301
|
+
# @return [Celerity::Link]
|
302
|
+
def link(*args)
|
303
|
+
Link.new(self, *args)
|
304
|
+
end
|
305
|
+
|
306
|
+
# @return [Celerity::Links]
|
307
|
+
def links
|
308
|
+
Links.new(self)
|
309
|
+
end
|
310
|
+
|
311
|
+
# @return [Celerity::Map]
|
312
|
+
def map(*args)
|
313
|
+
Map.new(self, *args)
|
314
|
+
end
|
315
|
+
|
316
|
+
# @return [Celerity::Maps]
|
317
|
+
def maps
|
318
|
+
Maps.new(self)
|
319
|
+
end
|
320
|
+
|
321
|
+
def meta(*args)
|
322
|
+
Meta.new(self, *args)
|
323
|
+
end
|
324
|
+
|
325
|
+
def metas(*args)
|
326
|
+
Metas.new(self, *args)
|
327
|
+
end
|
328
|
+
|
329
|
+
# @return [Celerity::Ol]
|
330
|
+
def ol(*args)
|
331
|
+
Ol.new(self, *args)
|
332
|
+
end
|
333
|
+
|
334
|
+
# @return [Celerity::Ols]
|
335
|
+
def ols
|
336
|
+
Ols.new(self)
|
337
|
+
end
|
338
|
+
|
339
|
+
# @return [Celerity::Option]
|
340
|
+
def option(*args)
|
341
|
+
Option.new(self, *args)
|
342
|
+
end
|
343
|
+
|
344
|
+
# @return [Celerity::P]
|
345
|
+
def p(*args)
|
346
|
+
P.new(self, *args)
|
347
|
+
end
|
348
|
+
|
349
|
+
# @return [Celerity::Ps]
|
350
|
+
def ps
|
351
|
+
Ps.new(self)
|
352
|
+
end
|
353
|
+
|
354
|
+
# @return [Celerity::Pre]
|
355
|
+
def pre(*args)
|
356
|
+
Pre.new(self, *args)
|
357
|
+
end
|
358
|
+
|
359
|
+
# @return [Celerity::Pres]
|
360
|
+
def pres
|
361
|
+
Pres.new(self)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Since finding radios by value is very common, you can use this shorthand:
|
365
|
+
#
|
366
|
+
# browser.radio(:name, 'a_name', '1234').set
|
367
|
+
#
|
368
|
+
# or
|
369
|
+
#
|
370
|
+
# browser.radio(:name => 'a_name', :value => '1234').set
|
371
|
+
#
|
372
|
+
# @return [Celerity::Radio]
|
373
|
+
def radio(*args)
|
374
|
+
Radio.new(self, *args)
|
375
|
+
end
|
376
|
+
|
377
|
+
# @return [Celerity::Radios]
|
378
|
+
def radios
|
379
|
+
Radios.new(self)
|
380
|
+
end
|
381
|
+
|
382
|
+
# @return [Celerity::TableRow]
|
383
|
+
def row(*args)
|
384
|
+
TableRow.new(self, *args)
|
385
|
+
end
|
386
|
+
|
387
|
+
# @return [Celerity::TableRows]
|
388
|
+
def rows
|
389
|
+
TableRows.new(self)
|
390
|
+
end
|
391
|
+
|
392
|
+
# @return [Celerity::SelectList]
|
393
|
+
def select_list(*args)
|
394
|
+
SelectList.new(self, *args)
|
395
|
+
end
|
396
|
+
|
397
|
+
# @return [Celerity::SelectLists]
|
398
|
+
def select_lists
|
399
|
+
SelectLists.new(self)
|
400
|
+
end
|
401
|
+
|
402
|
+
# @return [Celerity::Span]
|
403
|
+
def span(*args)
|
404
|
+
Span.new(self, *args)
|
405
|
+
end
|
406
|
+
|
407
|
+
# @return [Celerity::Spans]
|
408
|
+
def spans
|
409
|
+
Spans.new(self)
|
410
|
+
end
|
411
|
+
|
412
|
+
# @return [Celerity::Table]
|
413
|
+
def table(*args)
|
414
|
+
Table.new(self, *args)
|
415
|
+
end
|
416
|
+
|
417
|
+
# @return [Celerity::Tables]
|
418
|
+
def tables
|
419
|
+
Tables.new(self)
|
420
|
+
end
|
421
|
+
|
422
|
+
# @return [Celerity::TableBody]
|
423
|
+
def tbody(*args)
|
424
|
+
TableBody.new(self, *args)
|
425
|
+
end
|
426
|
+
|
427
|
+
# @return [Celerity::TableBodies]
|
428
|
+
def tbodies
|
429
|
+
TableBodies.new(self)
|
430
|
+
end
|
431
|
+
|
432
|
+
# @return [Celerity::TextField]
|
433
|
+
def text_field(*args)
|
434
|
+
TextField.new(self, *args)
|
435
|
+
end
|
436
|
+
|
437
|
+
# @return [Celerity::TextFields]
|
438
|
+
def text_fields
|
439
|
+
TextFields.new(self)
|
440
|
+
end
|
441
|
+
|
442
|
+
# @return [Celerity::TableFooter]
|
443
|
+
def tfoot(*args)
|
444
|
+
TableFooter.new(self, *args)
|
445
|
+
end
|
446
|
+
|
447
|
+
# @return [Celerity::TableFooters]
|
448
|
+
def tfoots
|
449
|
+
TableFooters.new(self)
|
450
|
+
end
|
451
|
+
alias_method :tfeet, :tfoots # :-)
|
452
|
+
|
453
|
+
# Watir's cells() won't return <th> elements.
|
454
|
+
# This is a workaround.
|
455
|
+
#
|
456
|
+
# @return [Celerity::Th]
|
457
|
+
def th(*args)
|
458
|
+
Th.new(self, *args)
|
459
|
+
end
|
460
|
+
|
461
|
+
# TODO: implement or change api,
|
462
|
+
# @see th
|
463
|
+
def ths
|
464
|
+
raise NotImplementedError
|
465
|
+
end
|
466
|
+
|
467
|
+
# @return [Celerity::TableHeader]
|
468
|
+
def thead(*args)
|
469
|
+
TableHeader.new(self, *args)
|
470
|
+
end
|
471
|
+
|
472
|
+
# @return [Celerity::TableHeaders]
|
473
|
+
def theads
|
474
|
+
TableHeaders.new(self)
|
475
|
+
end
|
476
|
+
|
477
|
+
# @return [Celerity::Ul]
|
478
|
+
def ul(*args)
|
479
|
+
Ul.new(self, *args)
|
480
|
+
end
|
481
|
+
|
482
|
+
# @return [Celerity::Uls]
|
483
|
+
def uls
|
484
|
+
Uls.new(self)
|
485
|
+
end
|
486
|
+
|
487
|
+
end # Container
|
488
|
+
end # Celerity
|