caius-celerity 0.0.6.10 → 0.0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +335 -0
- data/benchmark/bm_2000_spans.rb +48 -0
- data/benchmark/bm_digg.rb +26 -0
- data/benchmark/bm_google_images.rb +36 -0
- data/benchmark/bm_input_locator.rb +69 -0
- data/benchmark/bm_text_input.rb +19 -0
- data/benchmark/loader.rb +14 -0
- data/celerity.gemspec +33 -0
- data/config/hoe.rb +78 -0
- data/config/requirements.rb +9 -0
- data/lib/celerity/version.rb +1 -1
- data/spec/area_spec.rb +97 -0
- data/spec/areas_spec.rb +40 -0
- data/spec/browser_authentication_spec.rb +20 -0
- data/spec/browser_spec.rb +537 -0
- data/spec/button_spec.rb +244 -0
- data/spec/buttons_spec.rb +51 -0
- data/spec/checkbox_spec.rb +302 -0
- data/spec/checkboxes_spec.rb +38 -0
- data/spec/clickable_element_spec.rb +43 -0
- data/spec/dd_spec.rb +143 -0
- data/spec/dds_spec.rb +39 -0
- data/spec/default_viewer_spec.rb +24 -0
- data/spec/div_spec.rb +235 -0
- data/spec/divs_spec.rb +39 -0
- data/spec/dl_spec.rb +143 -0
- data/spec/dls_spec.rb +39 -0
- data/spec/dt_spec.rb +143 -0
- data/spec/dts_spec.rb +39 -0
- data/spec/element_spec.rb +150 -0
- data/spec/em_spec.rb +116 -0
- data/spec/ems_spec.rb +39 -0
- data/spec/filefield_spec.rb +133 -0
- data/spec/filefields_spec.rb +40 -0
- data/spec/form_spec.rb +59 -0
- data/spec/forms_spec.rb +41 -0
- data/spec/frame_spec.rb +139 -0
- data/spec/frames_spec.rb +71 -0
- data/spec/hidden_spec.rb +127 -0
- data/spec/hiddens_spec.rb +39 -0
- data/spec/hn_spec.rb +104 -0
- data/spec/hns_spec.rb +45 -0
- data/spec/html/2000_spans.html +2009 -0
- data/spec/html/bug_duplicate_attributes.html +14 -0
- data/spec/html/bug_javascript_001.html +11 -0
- data/spec/html/definition_lists.html +48 -0
- data/spec/html/euc-jp_text.html +17 -0
- data/spec/html/forms_with_input_elements.html +124 -0
- data/spec/html/frame_1.html +18 -0
- data/spec/html/frame_2.html +16 -0
- data/spec/html/frames.html +11 -0
- data/spec/html/iframes.html +12 -0
- data/spec/html/images.html +27 -0
- data/spec/html/images/1.gif +0 -0
- data/spec/html/images/2.gif +0 -0
- data/spec/html/images/3.gif +0 -0
- data/spec/html/images/button.jpg +0 -0
- data/spec/html/images/circle.jpg +0 -0
- data/spec/html/images/map.gif +0 -0
- data/spec/html/images/map2.gif +0 -0
- data/spec/html/images/minus.gif +0 -0
- data/spec/html/images/originaltriangle.jpg +0 -0
- data/spec/html/images/plus.gif +0 -0
- data/spec/html/images/square.jpg +0 -0
- data/spec/html/images/triangle.jpg +0 -0
- data/spec/html/iso-2022-jp_text.html +17 -0
- data/spec/html/jquery.html +29 -0
- data/spec/html/latin1_text.html +17 -0
- data/spec/html/multiple_ids.html +14 -0
- data/spec/html/non_control_elements.html +115 -0
- data/spec/html/right_click.html +16 -0
- data/spec/html/shift_jis_text.html +17 -0
- data/spec/html/tables.html +119 -0
- data/spec/html/timeout.html +16 -0
- data/spec/html/tiny_mce.html +29 -0
- data/spec/html/utf8_text.html +15 -0
- data/spec/htmlunit_spec.rb +47 -0
- data/spec/image_spec.rb +221 -0
- data/spec/images_spec.rb +39 -0
- data/spec/index_offset_spec.rb +26 -0
- data/spec/label_spec.rb +88 -0
- data/spec/labels_spec.rb +40 -0
- data/spec/li_spec.rb +139 -0
- data/spec/link_spec.rb +200 -0
- data/spec/links_spec.rb +47 -0
- data/spec/lis_spec.rb +40 -0
- data/spec/listener_spec.rb +142 -0
- data/spec/map_spec.rb +102 -0
- data/spec/maps_spec.rb +40 -0
- data/spec/meta_spec.rb +29 -0
- data/spec/metas_spec.rb +38 -0
- data/spec/ol_spec.rb +87 -0
- data/spec/ols_spec.rb +40 -0
- data/spec/option_spec.rb +156 -0
- data/spec/p_spec.rb +171 -0
- data/spec/pre_spec.rb +135 -0
- data/spec/pres_spec.rb +40 -0
- data/spec/ps_spec.rb +40 -0
- data/spec/radio_spec.rb +314 -0
- data/spec/radios_spec.rb +42 -0
- data/spec/select_list_spec.rb +320 -0
- data/spec/select_lists_spec.rb +47 -0
- data/spec/span_spec.rb +184 -0
- data/spec/spans_spec.rb +64 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +66 -0
- data/spec/strong_spec.rb +101 -0
- data/spec/strongs_spec.rb +40 -0
- data/spec/table_bodies_spec.rb +57 -0
- data/spec/table_body_spec.rb +109 -0
- data/spec/table_cell_spec.rb +84 -0
- data/spec/table_cells_spec.rb +59 -0
- data/spec/table_footer_spec.rb +96 -0
- data/spec/table_footers_spec.rb +55 -0
- data/spec/table_header_spec.rb +101 -0
- data/spec/table_headers_spec.rb +55 -0
- data/spec/table_row_spec.rb +106 -0
- data/spec/table_rows_spec.rb +58 -0
- data/spec/table_spec.rb +169 -0
- data/spec/tables_spec.rb +42 -0
- data/spec/text_field_spec.rb +331 -0
- data/spec/text_fields_spec.rb +44 -0
- data/spec/ul_spec.rb +88 -0
- data/spec/uls_spec.rb +40 -0
- data/spec/watir_compatibility_spec.rb +268 -0
- data/support/spec_server.rb +122 -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/rspec.rake +31 -0
- data/tasks/simple_ci.rake +94 -0
- data/tasks/snapshot.rake +22 -0
- data/tasks/specserver.rake +21 -0
- data/tasks/website.rake +17 -0
- data/tasks/yard.rake +9 -0
- data/website/benchmarks.html +237 -0
- data/website/css/color.css +153 -0
- data/website/css/hacks.css +3 -0
- data/website/css/layout.css +179 -0
- data/website/css/screen.css +5 -0
- data/website/css/textmate.css +226 -0
- data/website/css/typography.css +72 -0
- data/website/gfx/body_bg.gif +0 -0
- data/website/gfx/button_bg.jpg +0 -0
- data/website/gfx/header_bg.jpg +0 -0
- data/website/gfx/header_left.jpg +0 -0
- data/website/gfx/header_right.jpg +0 -0
- data/website/gfx/nav_bg.jpg +0 -0
- data/website/index.html +133 -0
- data/website/yard/Celerity.html +50 -0
- data/website/yard/Celerity/Area.html +212 -0
- data/website/yard/Celerity/Areas.html +103 -0
- data/website/yard/Celerity/Browser.html +5594 -0
- data/website/yard/Celerity/Button.html +312 -0
- data/website/yard/Celerity/Buttons.html +103 -0
- data/website/yard/Celerity/CheckBox.html +347 -0
- data/website/yard/Celerity/CheckBoxes.html +103 -0
- data/website/yard/Celerity/ClickableElement.html +448 -0
- data/website/yard/Celerity/Container.html +7676 -0
- data/website/yard/Celerity/Dd.html +198 -0
- data/website/yard/Celerity/Dds.html +103 -0
- data/website/yard/Celerity/DefaultViewer.html +101 -0
- data/website/yard/Celerity/DisabledElement.html +252 -0
- data/website/yard/Celerity/Div.html +198 -0
- data/website/yard/Celerity/Divs.html +103 -0
- data/website/yard/Celerity/Dl.html +198 -0
- data/website/yard/Celerity/Dls.html +103 -0
- data/website/yard/Celerity/Dt.html +198 -0
- data/website/yard/Celerity/Dts.html +103 -0
- data/website/yard/Celerity/Element.html +1703 -0
- data/website/yard/Celerity/ElementCollection.html +725 -0
- data/website/yard/Celerity/ElementLocator.html +589 -0
- data/website/yard/Celerity/Em.html +198 -0
- data/website/yard/Celerity/Ems.html +103 -0
- data/website/yard/Celerity/Exception.html +23 -0
- data/website/yard/Celerity/Exception/CelerityException.html +32 -0
- data/website/yard/Celerity/Exception/MissingWayOfFindingObjectException.html +32 -0
- data/website/yard/Celerity/Exception/NavigationException.html +33 -0
- data/website/yard/Celerity/Exception/NoValueFoundException.html +33 -0
- data/website/yard/Celerity/Exception/ObjectDisabledException.html +33 -0
- data/website/yard/Celerity/Exception/ObjectReadOnlyException.html +33 -0
- data/website/yard/Celerity/Exception/UnexpectedPageException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownCellException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownFormException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownFrameException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownObjectException.html +33 -0
- data/website/yard/Celerity/Exception/UnknownRowException.html +33 -0
- data/website/yard/Celerity/FileField.html +289 -0
- data/website/yard/Celerity/FileFields.html +103 -0
- data/website/yard/Celerity/Form.html +284 -0
- data/website/yard/Celerity/Forms.html +103 -0
- data/website/yard/Celerity/Frame.html +527 -0
- data/website/yard/Celerity/Frames.html +103 -0
- data/website/yard/Celerity/H1.html +198 -0
- data/website/yard/Celerity/H1s.html +103 -0
- data/website/yard/Celerity/H2.html +198 -0
- data/website/yard/Celerity/H2s.html +103 -0
- data/website/yard/Celerity/H3.html +198 -0
- data/website/yard/Celerity/H3s.html +103 -0
- data/website/yard/Celerity/H4.html +198 -0
- data/website/yard/Celerity/H4s.html +103 -0
- data/website/yard/Celerity/H5.html +198 -0
- data/website/yard/Celerity/H5s.html +103 -0
- data/website/yard/Celerity/H6.html +198 -0
- data/website/yard/Celerity/H6s.html +103 -0
- data/website/yard/Celerity/Hidden.html +285 -0
- data/website/yard/Celerity/Hiddens.html +103 -0
- data/website/yard/Celerity/Image.html +645 -0
- data/website/yard/Celerity/Images.html +103 -0
- data/website/yard/Celerity/InputElement.html +271 -0
- data/website/yard/Celerity/Label.html +210 -0
- data/website/yard/Celerity/Labels.html +103 -0
- data/website/yard/Celerity/Li.html +198 -0
- data/website/yard/Celerity/Link.html +295 -0
- data/website/yard/Celerity/Links.html +103 -0
- data/website/yard/Celerity/Lis.html +103 -0
- data/website/yard/Celerity/Listener.html +821 -0
- data/website/yard/Celerity/Map.html +198 -0
- data/website/yard/Celerity/Maps.html +103 -0
- data/website/yard/Celerity/Meta.html +196 -0
- data/website/yard/Celerity/Metas.html +103 -0
- data/website/yard/Celerity/MethodGenerator.html +195 -0
- data/website/yard/Celerity/NonControlElement.html +212 -0
- data/website/yard/Celerity/Ol.html +198 -0
- data/website/yard/Celerity/Ols.html +103 -0
- data/website/yard/Celerity/Option.html +348 -0
- data/website/yard/Celerity/Options.html +103 -0
- data/website/yard/Celerity/P.html +198 -0
- data/website/yard/Celerity/Pre.html +198 -0
- data/website/yard/Celerity/Pres.html +103 -0
- data/website/yard/Celerity/Ps.html +103 -0
- data/website/yard/Celerity/Radio.html +339 -0
- data/website/yard/Celerity/RadioCheckCommon.html +453 -0
- data/website/yard/Celerity/Radios.html +103 -0
- data/website/yard/Celerity/SelectList.html +1122 -0
- data/website/yard/Celerity/SelectLists.html +103 -0
- data/website/yard/Celerity/ShortInspect.html +108 -0
- data/website/yard/Celerity/Span.html +198 -0
- data/website/yard/Celerity/Spans.html +103 -0
- data/website/yard/Celerity/Strong.html +198 -0
- data/website/yard/Celerity/Strongs.html +103 -0
- data/website/yard/Celerity/Table.html +1287 -0
- data/website/yard/Celerity/TableBodies.html +103 -0
- data/website/yard/Celerity/TableBody.html +203 -0
- data/website/yard/Celerity/TableCell.html +279 -0
- data/website/yard/Celerity/TableCells.html +103 -0
- data/website/yard/Celerity/TableElement.html +437 -0
- data/website/yard/Celerity/TableFooter.html +203 -0
- data/website/yard/Celerity/TableFooters.html +103 -0
- data/website/yard/Celerity/TableHeader.html +203 -0
- data/website/yard/Celerity/TableHeaders.html +103 -0
- data/website/yard/Celerity/TableRow.html +478 -0
- data/website/yard/Celerity/TableRows.html +103 -0
- data/website/yard/Celerity/Tables.html +103 -0
- data/website/yard/Celerity/TextField.html +938 -0
- data/website/yard/Celerity/TextFields.html +103 -0
- data/website/yard/Celerity/Th.html +208 -0
- data/website/yard/Celerity/Ul.html +209 -0
- data/website/yard/Celerity/Uls.html +103 -0
- data/website/yard/Celerity/Util.html +264 -0
- data/website/yard/Celerity/VERSION.html +44 -0
- data/website/yard/HtmlUnit.html +23 -0
- data/website/yard/HtmlUnit/Html.html +23 -0
- data/website/yard/HtmlUnit/Util.html +23 -0
- data/website/yard/Java/ComGargoylesoftwareHtmlunitHtml/HtmlPage.html +90 -0
- data/website/yard/Java/JavaLang/Iterable.html +103 -0
- data/website/yard/Java/OrgW3cDom/NamedNodeMap.html +97 -0
- data/website/yard/README.txt.html +116 -0
- data/website/yard/String.html +103 -0
- data/website/yard/all-files.html +22 -0
- data/website/yard/all-methods.html +3276 -0
- data/website/yard/all-namespaces.html +258 -0
- data/website/yard/app.js +18 -0
- data/website/yard/index.html +19 -0
- data/website/yard/jquery.js +11 -0
- data/website/yard/style.css +68 -0
- data/website/yard/syntax_highlight.css +21 -0
- metadata +285 -13
@@ -0,0 +1,725 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
+
<link rel="stylesheet" href="../style.css" type="text/css" charset="utf-8" />
|
7
|
+
<link rel="stylesheet" href="../syntax_highlight.css" type="text/css" charset="utf-8" />
|
8
|
+
|
9
|
+
<script src="../jquery.js" type="text/javascript" charset="utf-8"></script>
|
10
|
+
<script src="../app.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<title>Class: Celerity::ElementCollection</title>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<div id="content">
|
15
|
+
<div class="section class Celerity_ElementCollection">
|
16
|
+
<h1 class="title">Class: Celerity::ElementCollection</h1>
|
17
|
+
<div class="section mixins">
|
18
|
+
<h1>Included Modules</h1>
|
19
|
+
<p>Enumerable</p>
|
20
|
+
</div><div class="section docstring">
|
21
|
+
<p>
|
22
|
+
This class is the superclass for the iterator classes (Buttons, Links,
|
23
|
+
Spans etc.) It would normally only be accessed by the iterator methods
|
24
|
+
(Browser#spans, Browser#links, …).
|
25
|
+
</p>
|
26
|
+
|
27
|
+
</div><div class="section constants">
|
28
|
+
|
29
|
+
</div><div class="section constructor">
|
30
|
+
<h1>Constructor Summary</h1>
|
31
|
+
<div id="initialize-instance_method" class="section method">
|
32
|
+
<div class="details_title">
|
33
|
+
<div class='section methodsignature'>
|
34
|
+
<tt class='def'>
|
35
|
+
<span class='visibility'>public</span>
|
36
|
+
<span class='return_types'></span>
|
37
|
+
<span class='name'>initialize</span><span class='args'>(container, how = nil, what = nil)</span>
|
38
|
+
<span class='block'></span>
|
39
|
+
</tt>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
</div><div class="section tags">
|
43
|
+
<h2>Meta Tags</h2>
|
44
|
+
<div class="param">
|
45
|
+
<h3>Parameters:</h3>
|
46
|
+
<dl>
|
47
|
+
|
48
|
+
</dl>
|
49
|
+
</div>
|
50
|
+
</div><div class="section source">
|
51
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
52
|
+
<div class="source_code">
|
53
|
+
<table>
|
54
|
+
<tr>
|
55
|
+
<td>
|
56
|
+
<pre class="lines">
|
57
|
+
|
58
|
+
|
59
|
+
15
|
60
|
+
16
|
61
|
+
17
|
62
|
+
18
|
63
|
+
19</pre>
|
64
|
+
</td>
|
65
|
+
<td>
|
66
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 15</span>
|
67
|
+
|
68
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='container identifier id'>container</span><span class='comma token'>,</span> <span class='how identifier id'>how</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='what identifier id'>what</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
|
69
|
+
<span class='@container ivar id'>@container</span> <span class='assign token'>=</span> <span class='container identifier id'>container</span>
|
70
|
+
<span class='@object ivar id'>@object</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='how identifier id'>how</span> <span class='eq op'>==</span> <span class='symbol val'>:object</span> <span class='question op'>?</span> <span class='what identifier id'>what</span> <span class='colon op'>:</span> <span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
|
71
|
+
<span class='@length ivar id'>@length</span> <span class='assign token'>=</span> <span class='length identifier id'>length</span>
|
72
|
+
<span class='end end kw'>end</span>
|
73
|
+
</pre>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
</table>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div> <div class="section visibilitygroup public">
|
81
|
+
<h1>Public Visibility</h1>
|
82
|
+
<div class="section methodsummary instance public">
|
83
|
+
<h1>Public Instance Method Summary</h1>
|
84
|
+
<table class="summary">
|
85
|
+
|
86
|
+
<tr>
|
87
|
+
<th class="signature">
|
88
|
+
<span class='name'><a title="#[]" href="#%5B%5D-instance_method">#[]</a></span><span class='args'>(n)</span>
|
89
|
+
<span class='block'></span>
|
90
|
+
|
91
|
+
</th>
|
92
|
+
<td class="docstring">
|
93
|
+
<p>
|
94
|
+
Get the element at the given index.
|
95
|
+
</p>
|
96
|
+
|
97
|
+
|
98
|
+
<p class='returns'>
|
99
|
+
Returns:
|
100
|
+
<span class='return_types'>
|
101
|
+
<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>
|
102
|
+
</span>
|
103
|
+
</p>
|
104
|
+
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
|
108
|
+
<tr>
|
109
|
+
<th class="signature">
|
110
|
+
<span class='name'><a title="#each" href="#each-instance_method">#each</a></span><span class='args'></span>
|
111
|
+
<span class='block'>{|element| ... }</span>
|
112
|
+
|
113
|
+
</th>
|
114
|
+
<td class="docstring">
|
115
|
+
|
116
|
+
|
117
|
+
</td>
|
118
|
+
</tr>
|
119
|
+
|
120
|
+
<tr>
|
121
|
+
<th class="signature">
|
122
|
+
<span class='name'><a title="#first" href="#first-instance_method">#first</a></span><span class='args'></span>
|
123
|
+
<span class='block'></span>
|
124
|
+
|
125
|
+
</th>
|
126
|
+
<td class="docstring">
|
127
|
+
<p>
|
128
|
+
Get the first element in this collection.
|
129
|
+
</p>
|
130
|
+
|
131
|
+
|
132
|
+
<p class='returns'>
|
133
|
+
Returns:
|
134
|
+
<span class='return_types'>
|
135
|
+
<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>
|
136
|
+
</span>
|
137
|
+
</p>
|
138
|
+
|
139
|
+
</td>
|
140
|
+
</tr>
|
141
|
+
|
142
|
+
<tr>
|
143
|
+
<th class="signature">
|
144
|
+
<span class='name'><a title="#last" href="#last-instance_method">#last</a></span><span class='args'></span>
|
145
|
+
<span class='block'></span>
|
146
|
+
|
147
|
+
</th>
|
148
|
+
<td class="docstring">
|
149
|
+
<p>
|
150
|
+
Get the last element in this collection.
|
151
|
+
</p>
|
152
|
+
|
153
|
+
|
154
|
+
<p class='returns'>
|
155
|
+
Returns:
|
156
|
+
<span class='return_types'>
|
157
|
+
<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>
|
158
|
+
</span>
|
159
|
+
</p>
|
160
|
+
|
161
|
+
</td>
|
162
|
+
</tr>
|
163
|
+
|
164
|
+
<tr>
|
165
|
+
<th class="signature">
|
166
|
+
<span class='name'><a title="#length" href="#length-instance_method">#length</a></span><span class='args'></span>
|
167
|
+
<span class='block'></span>
|
168
|
+
|
169
|
+
<span class='alias'>#size</span>
|
170
|
+
|
171
|
+
</th>
|
172
|
+
<td class="docstring">
|
173
|
+
|
174
|
+
|
175
|
+
<p class='returns'>
|
176
|
+
Returns:
|
177
|
+
<span class='return_types'>
|
178
|
+
<tt>Fixnum</tt>
|
179
|
+
</span>
|
180
|
+
</p>
|
181
|
+
|
182
|
+
</td>
|
183
|
+
</tr>
|
184
|
+
|
185
|
+
<tr>
|
186
|
+
<th class="signature">
|
187
|
+
<span class='name'><a title="#to_s" href="#to_s-instance_method">#to_s</a></span><span class='args'></span>
|
188
|
+
<span class='block'></span>
|
189
|
+
|
190
|
+
</th>
|
191
|
+
<td class="docstring">
|
192
|
+
<p>
|
193
|
+
Note: This can be quite useful in irb:.
|
194
|
+
</p>
|
195
|
+
|
196
|
+
|
197
|
+
<p class='returns'>
|
198
|
+
Returns:
|
199
|
+
<span class='return_types'>
|
200
|
+
<tt><a title="String" href="../String.html">String</a></tt>
|
201
|
+
</span>
|
202
|
+
</p>
|
203
|
+
|
204
|
+
</td>
|
205
|
+
</tr>
|
206
|
+
|
207
|
+
</table>
|
208
|
+
</div>
|
209
|
+
<div class="section methoddetails instance public">
|
210
|
+
<h1>Public Instance Method Details</h1>
|
211
|
+
|
212
|
+
<div class="method">
|
213
|
+
<div class="method_header">
|
214
|
+
<h3>[]</h3>
|
215
|
+
</div><div id="%5B%5D-instance_method" class="section method">
|
216
|
+
<div class="details_title">
|
217
|
+
<div class='section methodsignature'>
|
218
|
+
<tt class='def'>
|
219
|
+
<span class='visibility'>public</span>
|
220
|
+
<span class='return_types'><tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt></span>
|
221
|
+
<span class='name'>[]</span><span class='args'>(n)</span>
|
222
|
+
<span class='block'></span>
|
223
|
+
</tt>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
</div><div class="section docstring">
|
227
|
+
<p>
|
228
|
+
Get the element at the given index. This is 1-indexed to keep compatibility
|
229
|
+
with Watir - subject to change. Also note that because of Watir’s
|
230
|
+
lazy loading, this will return an Element instance even if the index is out
|
231
|
+
of bounds.
|
232
|
+
</p>
|
233
|
+
|
234
|
+
</div><div class="section tags">
|
235
|
+
<h2>Meta Tags</h2>
|
236
|
+
<div class="param">
|
237
|
+
<h3>Parameters:</h3>
|
238
|
+
<dl>
|
239
|
+
|
240
|
+
|
241
|
+
<dt>
|
242
|
+
<span class='type'>[<tt>Fixnum</tt>]</span>
|
243
|
+
<span class='name'>n</span>
|
244
|
+
|
245
|
+
</dt>
|
246
|
+
<dd>
|
247
|
+
<span class='desc'><p>
|
248
|
+
Index of wanted element, 1-indexed.
|
249
|
+
</p>
|
250
|
+
</span>
|
251
|
+
</dd>
|
252
|
+
|
253
|
+
|
254
|
+
</dl>
|
255
|
+
</div><div class="return">
|
256
|
+
<h3>Returns:</h3>
|
257
|
+
<dl>
|
258
|
+
|
259
|
+
<dt>
|
260
|
+
|
261
|
+
<span class='type'>[<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>]</span>
|
262
|
+
|
263
|
+
|
264
|
+
<span class='name'></span>
|
265
|
+
|
266
|
+
|
267
|
+
</dt>
|
268
|
+
<dd>
|
269
|
+
<span class='desc'><p>
|
270
|
+
Returns a subclass of Celerity::Element
|
271
|
+
</p>
|
272
|
+
</span>
|
273
|
+
</dd>
|
274
|
+
|
275
|
+
</dl>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</div><div class="section source">
|
279
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
280
|
+
<div class="source_code">
|
281
|
+
<table>
|
282
|
+
<tr>
|
283
|
+
<td>
|
284
|
+
<pre class="lines">
|
285
|
+
|
286
|
+
|
287
|
+
59
|
288
|
+
60
|
289
|
+
61
|
290
|
+
62
|
291
|
+
63
|
292
|
+
64
|
293
|
+
65</pre>
|
294
|
+
</td>
|
295
|
+
<td>
|
296
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 59</span>
|
297
|
+
|
298
|
+
<span class='def def kw'>def</span> <span class='aref op'>[]</span><span class='lparen token'>(</span><span class='n identifier id'>n</span><span class='rparen token'>)</span>
|
299
|
+
<span class='if if kw'>if</span> <span class='@elements ivar id'>@elements</span> <span class='andop op'>&&</span> <span class='@elements ivar id'>@elements</span><span class='lbrack token'>[</span><span class='n identifier id'>n</span> <span class='minus op'>-</span> <span class='Celerity.index_offset constant id'>Celerity.index_offset</span><span class='rbrack token'>]</span>
|
300
|
+
<span class='element_class identifier id'>element_class</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='@container ivar id'>@container</span><span class='comma token'>,</span> <span class='symbol val'>:object</span><span class='comma token'>,</span> <span class='@elements ivar id'>@elements</span><span class='lbrack token'>[</span><span class='n identifier id'>n</span> <span class='minus op'>-</span> <span class='Celerity.index_offset constant id'>Celerity.index_offset</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
301
|
+
<span class='else else kw'>else</span>
|
302
|
+
<span class='iterator_object identifier id'>iterator_object</span><span class='lparen token'>(</span><span class='n identifier id'>n</span> <span class='minus op'>-</span> <span class='Celerity.index_offset constant id'>Celerity.index_offset</span><span class='rparen token'>)</span>
|
303
|
+
<span class='end end kw'>end</span>
|
304
|
+
<span class='end end kw'>end</span>
|
305
|
+
</pre>
|
306
|
+
</td>
|
307
|
+
</tr>
|
308
|
+
</table>
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div class="method">
|
315
|
+
<div class="method_header">
|
316
|
+
<h3>each</h3>
|
317
|
+
</div><div id="each-instance_method" class="section method">
|
318
|
+
<div class="details_title">
|
319
|
+
<div class='section methodsignature'>
|
320
|
+
<tt class='def'>
|
321
|
+
<span class='visibility'>public</span>
|
322
|
+
<span class='return_types'></span>
|
323
|
+
<span class='name'>each</span><span class='args'></span>
|
324
|
+
<span class='block'>{|element| ... }</span>
|
325
|
+
</tt>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
</div><div class="section tags">
|
329
|
+
<h2>Meta Tags</h2>
|
330
|
+
<div class="param">
|
331
|
+
<h3>Parameters:</h3>
|
332
|
+
<dl>
|
333
|
+
|
334
|
+
</dl>
|
335
|
+
</div><div class="yieldparam">
|
336
|
+
<h3>Yield Parameters:</h3>
|
337
|
+
<dl>
|
338
|
+
|
339
|
+
<dt>
|
340
|
+
|
341
|
+
<span class='type'>[<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>]</span>
|
342
|
+
|
343
|
+
|
344
|
+
<span class='name'>element</span>
|
345
|
+
|
346
|
+
|
347
|
+
</dt>
|
348
|
+
<dd>
|
349
|
+
<span class='desc'><p>
|
350
|
+
Iterate through the elements in this collection.
|
351
|
+
</p>
|
352
|
+
</span>
|
353
|
+
</dd>
|
354
|
+
|
355
|
+
</dl>
|
356
|
+
</div>
|
357
|
+
|
358
|
+
</div><div class="section source">
|
359
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
360
|
+
<div class="source_code">
|
361
|
+
<table>
|
362
|
+
<tr>
|
363
|
+
<td>
|
364
|
+
<pre class="lines">
|
365
|
+
|
366
|
+
|
367
|
+
39
|
368
|
+
40
|
369
|
+
41
|
370
|
+
42
|
371
|
+
43
|
372
|
+
44
|
373
|
+
45
|
374
|
+
46
|
375
|
+
47</pre>
|
376
|
+
</td>
|
377
|
+
<td>
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 39</span>
|
379
|
+
|
380
|
+
<span class='def def kw'>def</span> <span class='each identifier id'>each</span>
|
381
|
+
<span class='if if kw'>if</span> <span class='@elements ivar id'>@elements</span>
|
382
|
+
<span class='@elements ivar id'>@elements</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='e identifier id'>e</span><span class='bitor op'>|</span> <span class='yield yield kw'>yield</span><span class='lparen token'>(</span><span class='element_class identifier id'>element_class</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='@container ivar id'>@container</span><span class='comma token'>,</span> <span class='symbol val'>:object</span><span class='comma token'>,</span> <span class='e identifier id'>e</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
383
|
+
<span class='else else kw'>else</span>
|
384
|
+
<span class='integer val'>0</span><span class='dot token'>.</span><span class='upto identifier id'>upto</span><span class='lparen token'>(</span><span class='@length ivar id'>@length</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='i identifier id'>i</span><span class='bitor op'>|</span> <span class='yield yield kw'>yield</span> <span class='iterator_object identifier id'>iterator_object</span><span class='lparen token'>(</span><span class='i identifier id'>i</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
385
|
+
<span class='end end kw'>end</span>
|
386
|
+
|
387
|
+
<span class='@length ivar id'>@length</span>
|
388
|
+
<span class='end end kw'>end</span>
|
389
|
+
</pre>
|
390
|
+
</td>
|
391
|
+
</tr>
|
392
|
+
</table>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
</div>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
<div class="method">
|
399
|
+
<div class="method_header">
|
400
|
+
<h3>first</h3>
|
401
|
+
</div><div id="first-instance_method" class="section method">
|
402
|
+
<div class="details_title">
|
403
|
+
<div class='section methodsignature'>
|
404
|
+
<tt class='def'>
|
405
|
+
<span class='visibility'>public</span>
|
406
|
+
<span class='return_types'><tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt></span>
|
407
|
+
<span class='name'>first</span><span class='args'></span>
|
408
|
+
<span class='block'></span>
|
409
|
+
</tt>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
</div><div class="section docstring">
|
413
|
+
<p>
|
414
|
+
Get the first element in this collection. (Celerity-specific)
|
415
|
+
</p>
|
416
|
+
|
417
|
+
</div><div class="section tags">
|
418
|
+
<h2>Meta Tags</h2>
|
419
|
+
<div class="param">
|
420
|
+
<h3>Parameters:</h3>
|
421
|
+
<dl>
|
422
|
+
|
423
|
+
</dl>
|
424
|
+
</div><div class="return">
|
425
|
+
<h3>Returns:</h3>
|
426
|
+
<dl>
|
427
|
+
|
428
|
+
<dt>
|
429
|
+
|
430
|
+
<span class='type'>[<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>]</span>
|
431
|
+
|
432
|
+
|
433
|
+
<span class='name'></span>
|
434
|
+
|
435
|
+
|
436
|
+
</dt>
|
437
|
+
<dd>
|
438
|
+
<span class='desc'><p>
|
439
|
+
Returns a subclass of Celerity::Element
|
440
|
+
</p>
|
441
|
+
</span>
|
442
|
+
</dd>
|
443
|
+
|
444
|
+
</dl>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
</div><div class="section source">
|
448
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
449
|
+
<div class="source_code">
|
450
|
+
<table>
|
451
|
+
<tr>
|
452
|
+
<td>
|
453
|
+
<pre class="lines">
|
454
|
+
|
455
|
+
|
456
|
+
73
|
457
|
+
74
|
458
|
+
75</pre>
|
459
|
+
</td>
|
460
|
+
<td>
|
461
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 73</span>
|
462
|
+
|
463
|
+
<span class='def def kw'>def</span> <span class='first identifier id'>first</span>
|
464
|
+
<span class='self self kw'>self</span><span class='lbrack token'>[</span><span class='Celerity.index_offset constant id'>Celerity.index_offset</span><span class='rbrack token'>]</span>
|
465
|
+
<span class='end end kw'>end</span>
|
466
|
+
</pre>
|
467
|
+
</td>
|
468
|
+
</tr>
|
469
|
+
</table>
|
470
|
+
</div>
|
471
|
+
</div>
|
472
|
+
</div>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
<div class="method">
|
476
|
+
<div class="method_header">
|
477
|
+
<h3>last</h3>
|
478
|
+
</div><div id="last-instance_method" class="section method">
|
479
|
+
<div class="details_title">
|
480
|
+
<div class='section methodsignature'>
|
481
|
+
<tt class='def'>
|
482
|
+
<span class='visibility'>public</span>
|
483
|
+
<span class='return_types'><tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt></span>
|
484
|
+
<span class='name'>last</span><span class='args'></span>
|
485
|
+
<span class='block'></span>
|
486
|
+
</tt>
|
487
|
+
</div>
|
488
|
+
|
489
|
+
</div><div class="section docstring">
|
490
|
+
<p>
|
491
|
+
Get the last element in this collection. (Celerity-specific)
|
492
|
+
</p>
|
493
|
+
|
494
|
+
</div><div class="section tags">
|
495
|
+
<h2>Meta Tags</h2>
|
496
|
+
<div class="param">
|
497
|
+
<h3>Parameters:</h3>
|
498
|
+
<dl>
|
499
|
+
|
500
|
+
</dl>
|
501
|
+
</div><div class="return">
|
502
|
+
<h3>Returns:</h3>
|
503
|
+
<dl>
|
504
|
+
|
505
|
+
<dt>
|
506
|
+
|
507
|
+
<span class='type'>[<tt><a title="Celerity::Element" href="Element.html">Celerity::Element</a></tt>]</span>
|
508
|
+
|
509
|
+
|
510
|
+
<span class='name'></span>
|
511
|
+
|
512
|
+
|
513
|
+
</dt>
|
514
|
+
<dd>
|
515
|
+
<span class='desc'><p>
|
516
|
+
Returns a subclass of Celerity::Element
|
517
|
+
</p>
|
518
|
+
</span>
|
519
|
+
</dd>
|
520
|
+
|
521
|
+
</dl>
|
522
|
+
</div>
|
523
|
+
|
524
|
+
</div><div class="section source">
|
525
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
526
|
+
<div class="source_code">
|
527
|
+
<table>
|
528
|
+
<tr>
|
529
|
+
<td>
|
530
|
+
<pre class="lines">
|
531
|
+
|
532
|
+
|
533
|
+
83
|
534
|
+
84
|
535
|
+
85</pre>
|
536
|
+
</td>
|
537
|
+
<td>
|
538
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 83</span>
|
539
|
+
|
540
|
+
<span class='def def kw'>def</span> <span class='last identifier id'>last</span>
|
541
|
+
<span class='self self kw'>self</span><span class='lbrack token'>[</span><span class='Celerity.index_offset constant id'>Celerity.index_offset</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rbrack token'>]</span>
|
542
|
+
<span class='end end kw'>end</span>
|
543
|
+
</pre>
|
544
|
+
</td>
|
545
|
+
</tr>
|
546
|
+
</table>
|
547
|
+
</div>
|
548
|
+
</div>
|
549
|
+
</div>
|
550
|
+
</div>
|
551
|
+
|
552
|
+
<div class="method">
|
553
|
+
<div class="method_header">
|
554
|
+
<h3>length</h3>
|
555
|
+
</div><div id="length-instance_method" class="section method">
|
556
|
+
<div class="details_title">
|
557
|
+
<div class='section methodsignature'>
|
558
|
+
<tt class='def'>
|
559
|
+
<span class='visibility'>public</span>
|
560
|
+
<span class='return_types'><tt>Fixnum</tt></span>
|
561
|
+
<span class='name'>length</span><span class='args'></span>
|
562
|
+
<span class='block'></span>
|
563
|
+
</tt>
|
564
|
+
</div>
|
565
|
+
<p class="aliases">
|
566
|
+
<span class="aka">Also known as:</span>
|
567
|
+
|
568
|
+
<tt id="size-instance_method">size</tt>
|
569
|
+
|
570
|
+
</p>
|
571
|
+
</div><div class="section tags">
|
572
|
+
<h2>Meta Tags</h2>
|
573
|
+
<div class="param">
|
574
|
+
<h3>Parameters:</h3>
|
575
|
+
<dl>
|
576
|
+
|
577
|
+
</dl>
|
578
|
+
</div><div class="return">
|
579
|
+
<h3>Returns:</h3>
|
580
|
+
<dl>
|
581
|
+
|
582
|
+
<dt>
|
583
|
+
|
584
|
+
<span class='type'>[<tt>Fixnum</tt>]</span>
|
585
|
+
|
586
|
+
|
587
|
+
<span class='name'></span>
|
588
|
+
|
589
|
+
|
590
|
+
</dt>
|
591
|
+
<dd>
|
592
|
+
<span class='desc'><p>
|
593
|
+
The number of elements in this collection.
|
594
|
+
</p>
|
595
|
+
</span>
|
596
|
+
</dd>
|
597
|
+
|
598
|
+
</dl>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
</div><div class="section source">
|
602
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
603
|
+
<div class="source_code">
|
604
|
+
<table>
|
605
|
+
<tr>
|
606
|
+
<td>
|
607
|
+
<pre class="lines">
|
608
|
+
|
609
|
+
|
610
|
+
25
|
611
|
+
26
|
612
|
+
27
|
613
|
+
28
|
614
|
+
29
|
615
|
+
30
|
616
|
+
31
|
617
|
+
32</pre>
|
618
|
+
</td>
|
619
|
+
<td>
|
620
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 25</span>
|
621
|
+
|
622
|
+
<span class='def def kw'>def</span> <span class='length identifier id'>length</span>
|
623
|
+
<span class='if if kw'>if</span> <span class='@object ivar id'>@object</span>
|
624
|
+
<span class='@object ivar id'>@object</span><span class='dot token'>.</span><span class='length identifier id'>length</span>
|
625
|
+
<span class='else else kw'>else</span>
|
626
|
+
<span class='@elements ivar id'>@elements</span> <span class='opasgn op'>||=</span> <span class='ElementLocator constant id'>ElementLocator</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='@container ivar id'>@container</span><span class='comma token'>,</span> <span class='element_class identifier id'>element_class</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='elements_by_idents identifier id'>elements_by_idents</span>
|
627
|
+
<span class='@elements ivar id'>@elements</span><span class='dot token'>.</span><span class='size identifier id'>size</span>
|
628
|
+
<span class='end end kw'>end</span>
|
629
|
+
<span class='end end kw'>end</span>
|
630
|
+
</pre>
|
631
|
+
</td>
|
632
|
+
</tr>
|
633
|
+
</table>
|
634
|
+
</div>
|
635
|
+
</div>
|
636
|
+
</div>
|
637
|
+
</div>
|
638
|
+
|
639
|
+
<div class="method">
|
640
|
+
<div class="method_header">
|
641
|
+
<h3>to_s</h3>
|
642
|
+
</div><div id="to_s-instance_method" class="section method">
|
643
|
+
<div class="details_title">
|
644
|
+
<div class='section methodsignature'>
|
645
|
+
<tt class='def'>
|
646
|
+
<span class='visibility'>public</span>
|
647
|
+
<span class='return_types'><tt><a title="String" href="../String.html">String</a></tt></span>
|
648
|
+
<span class='name'>to_s</span><span class='args'></span>
|
649
|
+
<span class='block'></span>
|
650
|
+
</tt>
|
651
|
+
</div>
|
652
|
+
|
653
|
+
</div><div class="section docstring">
|
654
|
+
<p>
|
655
|
+
Note: This can be quite useful in irb:
|
656
|
+
</p>
|
657
|
+
<pre class="code">
|
658
|
+
<span class='puts identifier id'>puts</span> <span class='browser identifier id'>browser</span><span class='dot token'>.</span><span class='text_fields identifier id'>text_fields</span>
|
659
|
+
</pre>
|
660
|
+
|
661
|
+
</div><div class="section tags">
|
662
|
+
<h2>Meta Tags</h2>
|
663
|
+
<div class="param">
|
664
|
+
<h3>Parameters:</h3>
|
665
|
+
<dl>
|
666
|
+
|
667
|
+
</dl>
|
668
|
+
</div><div class="return">
|
669
|
+
<h3>Returns:</h3>
|
670
|
+
<dl>
|
671
|
+
|
672
|
+
<dt>
|
673
|
+
|
674
|
+
<span class='type'>[<tt><a title="String" href="../String.html">String</a></tt>]</span>
|
675
|
+
|
676
|
+
|
677
|
+
<span class='name'></span>
|
678
|
+
|
679
|
+
|
680
|
+
</dt>
|
681
|
+
<dd>
|
682
|
+
<span class='desc'><p>
|
683
|
+
A string representation of all elements in this collection.
|
684
|
+
</p>
|
685
|
+
</span>
|
686
|
+
</dd>
|
687
|
+
|
688
|
+
</dl>
|
689
|
+
</div>
|
690
|
+
|
691
|
+
</div><div class="section source">
|
692
|
+
<span>[<a class="source_link" href="#">View source</a>]</span>
|
693
|
+
<div class="source_code">
|
694
|
+
<table>
|
695
|
+
<tr>
|
696
|
+
<td>
|
697
|
+
<pre class="lines">
|
698
|
+
|
699
|
+
|
700
|
+
95
|
701
|
+
96
|
702
|
+
97</pre>
|
703
|
+
</td>
|
704
|
+
<td>
|
705
|
+
<pre class="code"><span class="info file"># File 'lib/celerity/element_collection.rb', line 95</span>
|
706
|
+
|
707
|
+
<span class='def def kw'>def</span> <span class='to_s identifier id'>to_s</span>
|
708
|
+
<span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='e identifier id'>e</span><span class='bitor op'>|</span> <span class='e identifier id'>e</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span> <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>"\n"</span><span class='rparen token'>)</span>
|
709
|
+
<span class='end end kw'>end</span>
|
710
|
+
</pre>
|
711
|
+
</td>
|
712
|
+
</tr>
|
713
|
+
</table>
|
714
|
+
</div>
|
715
|
+
</div>
|
716
|
+
</div>
|
717
|
+
</div>
|
718
|
+
|
719
|
+
</div>
|
720
|
+
</div>
|
721
|
+
|
722
|
+
</div>
|
723
|
+
</div>
|
724
|
+
</body>
|
725
|
+
</html>
|