bauxite 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -295,7 +295,7 @@ href="Context.html#method-i-stop">stop</a> (defaults to <code>false</code>)</p>
295
295
 
296
296
 
297
297
  <div class="method-source-code" id="new-source">
298
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 68</span>
298
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 69</span>
299
299
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
300
300
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
301
301
  <span class="ruby-ivar">@driver_name</span> = (<span class="ruby-identifier">options</span>[<span class="ruby-value">:driver</span>] <span class="ruby-operator">||</span> <span class="ruby-value">:firefox</span>).<span class="ruby-identifier">to_sym</span>
@@ -357,7 +357,7 @@ href="Context.html#method-i-stop">stop</a> (defaults to <code>false</code>)</p>
357
357
 
358
358
 
359
359
  <div class="method-source-code" id="debug-source">
360
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 175</span>
360
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 176</span>
361
361
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">debug</span>
362
362
  <span class="ruby-identifier">exec_action</span>(<span class="ruby-string">&#39;debug&#39;</span>, <span class="ruby-keyword">false</span>)
363
363
  <span class="ruby-keyword">end</span></pre>
@@ -414,7 +414,7 @@ applies if no <code>block</code> was given).</p>
414
414
 
415
415
 
416
416
  <div class="method-source-code" id="find-source">
417
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 164</span>
417
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 165</span>
418
418
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">selector</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-comment"># yields: element</span>
419
419
  <span class="ruby-identifier">with_timeout</span> <span class="ruby-constant">Selenium</span><span class="ruby-operator">::</span><span class="ruby-constant">WebDriver</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span><span class="ruby-operator">::</span><span class="ruby-constant">NoSuchElementError</span> <span class="ruby-keyword">do</span>
420
420
  <span class="ruby-constant">Selector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>).<span class="ruby-identifier">find</span>(<span class="ruby-identifier">selector</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -464,7 +464,7 @@ the inner text or the value of the <code>value</code> attribute.</p>
464
464
 
465
465
 
466
466
  <div class="method-source-code" id="get_value-source">
467
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 194</span>
467
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 195</span>
468
468
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">element</span>)
469
469
  <span class="ruby-keyword">if</span> [<span class="ruby-string">&#39;input&#39;</span>,<span class="ruby-string">&#39;select&#39;</span>,<span class="ruby-string">&#39;textarea&#39;</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">element</span>.<span class="ruby-identifier">tag_name</span>.<span class="ruby-identifier">downcase</span>
470
470
  <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-string">&#39;value&#39;</span>)
@@ -507,7 +507,7 @@ the inner text or the value of the <code>value</code> attribute.</p>
507
507
 
508
508
 
509
509
  <div class="method-source-code" id="reset_driver-source">
510
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 119</span>
510
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 120</span>
511
511
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">reset_driver</span>
512
512
  <span class="ruby-ivar">@driver</span>.<span class="ruby-identifier">quit</span>
513
513
  <span class="ruby-identifier">_load_driver</span>
@@ -556,7 +556,7 @@ href="Context.html#method-i-stop">stop</a>).</p>
556
556
 
557
557
 
558
558
  <div class="method-source-code" id="start-source">
559
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 101</span>
559
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 102</span>
560
560
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">actions</span> = [])
561
561
  <span class="ruby-identifier">_load_driver</span>
562
562
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">actions</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
@@ -615,7 +615,7 @@ href="Context.html#method-i-stop">stop</a> pattern.</p>
615
615
 
616
616
 
617
617
  <div class="method-source-code" id="stop-source">
618
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 139</span>
618
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 140</span>
619
619
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">stop</span>
620
620
  <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">wait</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value">:wait</span>]
621
621
  <span class="ruby-ivar">@driver</span>.<span class="ruby-identifier">quit</span>
@@ -681,7 +681,7 @@ logger type.</p>
681
681
 
682
682
 
683
683
  <div class="method-source-code" id="load_logger-source">
684
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 315</span>
684
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 316</span>
685
685
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_logger</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
686
686
  <span class="ruby-identifier">log_name</span> = (<span class="ruby-identifier">name</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;null&#39;</span>).<span class="ruby-identifier">downcase</span>
687
687
 
@@ -723,7 +723,7 @@ logger type.</p>
723
723
 
724
724
 
725
725
  <div class="method-source-code" id="parse_action_default-source">
726
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 337</span>
726
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 338</span>
727
727
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parse_action_default</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">file</span> = <span class="ruby-string">&#39;&lt;unknown&gt;&#39;</span>, <span class="ruby-identifier">line</span> = <span class="ruby-value">0</span>)
728
728
  <span class="ruby-identifier">data</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39; &#39;</span>, <span class="ruby-value">2</span>)
729
729
  <span class="ruby-keyword">begin</span>
@@ -791,7 +791,7 @@ logger type.</p>
791
791
 
792
792
 
793
793
  <div class="method-source-code" id="wait-source">
794
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 308</span>
794
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 309</span>
795
795
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">wait</span>
796
796
  <span class="ruby-constant">Readline</span>.<span class="ruby-identifier">readline</span>(<span class="ruby-string">&quot;Press ENTER to continue\n&quot;</span>)
797
797
  <span class="ruby-keyword">end</span></pre>
@@ -833,7 +833,7 @@ with the arguments specified in <code>args</code>.</p>
833
833
 
834
834
 
835
835
  <div class="method-source-code" id="add_alias-source">
836
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 331</span>
836
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 332</span>
837
837
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">add_alias</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">action</span>, <span class="ruby-identifier">args</span>)
838
838
  <span class="ruby-ivar">@aliases</span>[<span class="ruby-identifier">name</span>] = { <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">action</span>, <span class="ruby-value">:args</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">args</span> }
839
839
  <span class="ruby-keyword">end</span></pre>
@@ -876,7 +876,7 @@ behavior).</p>
876
876
 
877
877
 
878
878
  <div class="method-source-code" id="exec_action-source">
879
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 215</span>
879
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 216</span>
880
880
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_action</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">log</span> = <span class="ruby-keyword">true</span>, <span class="ruby-identifier">file</span> = <span class="ruby-string">&#39;&lt;unknown&gt;&#39;</span>, <span class="ruby-identifier">line</span> = <span class="ruby-value">0</span>)
881
881
  <span class="ruby-identifier">data</span> = <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">parse_action_default</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>)
882
882
  <span class="ruby-identifier">_exec_parsed_action</span>(<span class="ruby-identifier">data</span>[<span class="ruby-value">:action</span>], <span class="ruby-identifier">data</span>[<span class="ruby-value">:args</span>], <span class="ruby-identifier">text</span>, <span class="ruby-identifier">log</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>)
@@ -916,7 +916,7 @@ behavior).</p>
916
916
 
917
917
 
918
918
  <div class="method-source-code" id="exec_file-source">
919
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 226</span>
919
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 227</span>
920
920
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_file</span>(<span class="ruby-identifier">file</span>)
921
921
  <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">action</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
922
922
  <span class="ruby-identifier">_exec_parsed_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">text</span>, <span class="ruby-keyword">true</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>)
@@ -971,7 +971,7 @@ handler will not exit after printing the error message.</p>
971
971
 
972
972
 
973
973
  <div class="method-source-code" id="handle_errors-source">
974
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 251</span>
974
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 252</span>
975
975
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">handle_errors</span>(<span class="ruby-identifier">break_into_debug</span> = <span class="ruby-keyword">false</span>, <span class="ruby-identifier">exit_on_error</span> = <span class="ruby-keyword">true</span>)
976
976
  <span class="ruby-keyword">yield</span>
977
977
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
@@ -1036,7 +1036,7 @@ to execute the block itself.</p>
1036
1036
 
1037
1037
 
1038
1038
  <div class="method-source-code" id="with_timeout-source">
1039
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 287</span>
1039
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 288</span>
1040
1040
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">with_timeout</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">error_types</span>)
1041
1041
  <span class="ruby-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
1042
1042
  <span class="ruby-identifier">timeout</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">stime</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@variables</span>[<span class="ruby-string">&#39;__TIMEOUT__&#39;</span>]
@@ -1117,7 +1117,7 @@ to execute the block itself.</p>
1117
1117
 
1118
1118
 
1119
1119
  <div class="method-source-code" id="action_args-source">
1120
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 390</span>
1120
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 391</span>
1121
1121
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">action_args</span>(<span class="ruby-identifier">action</span>)
1122
1122
  <span class="ruby-identifier">action</span> <span class="ruby-operator">+=</span> <span class="ruby-string">&#39;_action&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">_action_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">action</span>
1123
1123
  <span class="ruby-constant">Action</span>.<span class="ruby-identifier">public_instance_method</span>(<span class="ruby-identifier">action</span>).<span class="ruby-identifier">parameters</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">att</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> }
@@ -1157,7 +1157,7 @@ to execute the block itself.</p>
1157
1157
 
1158
1158
 
1159
1159
  <div class="method-source-code" id="actions-source">
1160
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 380</span>
1160
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 381</span>
1161
1161
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">actions</span>
1162
1162
  <span class="ruby-identifier">_action_methods</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/_action$/</span>, <span class="ruby-string">&#39;&#39;</span>) }
1163
1163
  <span class="ruby-keyword">end</span></pre>
@@ -1196,7 +1196,7 @@ to execute the block itself.</p>
1196
1196
 
1197
1197
 
1198
1198
  <div class="method-source-code" id="loggers-source">
1199
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 419</span>
1199
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 420</span>
1200
1200
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">loggers</span>
1201
1201
  <span class="ruby-constant">Loggers</span>.<span class="ruby-identifier">constants</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/logger$/</span>, <span class="ruby-string">&#39;&#39;</span>) }
1202
1202
  <span class="ruby-keyword">end</span></pre>
@@ -1238,7 +1238,7 @@ to execute the block itself.</p>
1238
1238
 
1239
1239
 
1240
1240
  <div class="method-source-code" id="max_action_name_size-source">
1241
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 443</span>
1241
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 444</span>
1242
1242
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">max_action_name_size</span>
1243
1243
  <span class="ruby-identifier">actions</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">s</span> }
1244
1244
  <span class="ruby-keyword">end</span></pre>
@@ -1277,7 +1277,7 @@ to execute the block itself.</p>
1277
1277
 
1278
1278
 
1279
1279
  <div class="method-source-code" id="parsers-source">
1280
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 429</span>
1280
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 430</span>
1281
1281
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parsers</span>
1282
1282
  (<span class="ruby-constant">Parser</span>.<span class="ruby-identifier">public_instance_methods</span>(<span class="ruby-keyword">false</span>) <span class="ruby-operator">-</span> <span class="ruby-constant">ParserModule</span>.<span class="ruby-identifier">public_instance_methods</span>(<span class="ruby-keyword">false</span>))
1283
1283
  .<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">to_s</span> }
@@ -1321,7 +1321,7 @@ custom selectors are returned.</p>
1321
1321
 
1322
1322
 
1323
1323
  <div class="method-source-code" id="selectors-source">
1324
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 405</span>
1324
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 406</span>
1325
1325
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">selectors</span>(<span class="ruby-identifier">include_standard_selectors</span> = <span class="ruby-keyword">true</span>)
1326
1326
  <span class="ruby-identifier">ret</span> = <span class="ruby-constant">Selector</span>.<span class="ruby-identifier">public_instance_methods</span>(<span class="ruby-keyword">false</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/_selector$/</span>, <span class="ruby-string">&#39;&#39;</span>) }
1327
1327
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">include_standard_selectors</span>
@@ -1403,7 +1403,7 @@ with the corresponding variable value.</p>
1403
1403
 
1404
1404
 
1405
1405
  <div class="method-source-code" id="expand-source">
1406
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 464</span>
1406
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 465</span>
1407
1407
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">expand</span>(<span class="ruby-identifier">s</span>)
1408
1408
  <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@variables</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">s</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">kv</span><span class="ruby-operator">|</span>
1409
1409
  <span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/\$\{#{kv[0]}\}/</span>, <span class="ruby-identifier">kv</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_s</span>)
@@ -1456,7 +1456,7 @@ variables is restored.</p>
1456
1456
 
1457
1457
 
1458
1458
  <div class="method-source-code" id="with_vars-source">
1459
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 487</span>
1459
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 488</span>
1460
1460
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">with_vars</span>(<span class="ruby-identifier">vars</span>)
1461
1461
  <span class="ruby-identifier">current</span> = <span class="ruby-ivar">@variables</span>
1462
1462
  <span class="ruby-ivar">@variables</span> = <span class="ruby-ivar">@variables</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">vars</span>)
@@ -1482,7 +1482,7 @@ variables is restored.</p>
1482
1482
 
1483
1483
  <footer id="validator-badges" role="contentinfo">
1484
1484
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
1485
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
1485
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
1486
1486
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
1487
1487
  </footer>
1488
1488
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -94,7 +94,7 @@
94
94
 
95
95
  <footer id="validator-badges" role="contentinfo">
96
96
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
97
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
97
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
98
98
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
99
99
  </footer>
100
100
 
@@ -319,7 +319,7 @@ first logger.</p>
319
319
 
320
320
  <footer id="validator-badges" role="contentinfo">
321
321
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
322
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
322
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
323
323
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
324
324
  </footer>
325
325
 
@@ -159,7 +159,7 @@ action succeeded, failed or was skipped).</p>
159
159
 
160
160
  <footer id="validator-badges" role="contentinfo">
161
161
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
162
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
162
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
163
163
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
164
164
  </footer>
165
165
 
@@ -209,7 +209,7 @@ file specified in the <code>file</code> logger option.</p>
209
209
 
210
210
  <footer id="validator-badges" role="contentinfo">
211
211
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
212
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
212
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
213
213
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
214
214
  </footer>
215
215
 
@@ -328,7 +328,7 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
328
328
 
329
329
  <footer id="validator-badges" role="contentinfo">
330
330
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
331
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
331
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
332
332
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
333
333
  </footer>
334
334
 
@@ -585,7 +585,7 @@
585
585
 
586
586
  <footer id="validator-badges" role="contentinfo">
587
587
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
588
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
588
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
589
589
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
590
590
  </footer>
591
591
 
@@ -283,7 +283,7 @@
283
283
 
284
284
  <footer id="validator-badges" role="contentinfo">
285
285
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
286
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
286
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
287
287
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
288
288
  </footer>
289
289
 
@@ -97,7 +97,7 @@ module.</p>
97
97
 
98
98
  <footer id="validator-badges" role="contentinfo">
99
99
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
100
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
100
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
101
101
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
102
102
  </footer>
103
103
 
@@ -76,7 +76,18 @@
76
76
 
77
77
  </div>
78
78
 
79
-
79
+ <div id="includes-section" class="nav-section">
80
+ <h3>Included Modules</h3>
81
+
82
+ <ul class="link-list">
83
+
84
+
85
+ <li><a class="include" href="ParserModule.html">Bauxite::ParserModule</a>
86
+
87
+
88
+ </ul>
89
+ </div>
90
+
80
91
 
81
92
  <!-- Method Quickref -->
82
93
  <div id="method-list-section" class="nav-section">
@@ -103,6 +114,47 @@
103
114
 
104
115
  <section class="description">
105
116
 
117
+ <p><a href="Parser.html">Parser</a> class.</p>
118
+
119
+ <p><a href="Parser.html">Parser</a> represent different strategies for reading
120
+ input files into lists of <a href="../Bauxite.html">Bauxite</a> actions.</p>
121
+
122
+ <p>Each custom parser is defined in a separate file in the &#39;parsers/&#39;
123
+ directory. These files should avoid adding public methods other than the
124
+ parser method itself. Also, no <code>attr_accessors</code> should be added.</p>
125
+
126
+ <p><a href="Parser.html">Parser</a> methods can use the <code>ctx</code>
127
+ attribute to refer to the current test Context. <a
128
+ href="Parser.html">Parser</a> methods receive a single action hash argument
129
+ including <code>:file</code> and return an array of arrays or nil if the
130
+ parser can&#39;t handle the file.</p>
131
+
132
+ <p>Each element in the output array must contain the following fields:</p>
133
+
134
+ <pre>[
135
+ action, # action name
136
+ args, # args array
137
+ text, # raw action text (before parsing), or nil
138
+ line # line in the file that defined the action
139
+ ]</pre>
140
+
141
+ <p>For example:</p>
142
+
143
+ <pre class="ruby"><span class="ruby-comment"># === parsers/my_parser.rb ======= #</span>
144
+ <span class="ruby-keyword">class</span> <span class="ruby-constant">Parser</span>
145
+ <span class="ruby-comment"># :category: Parser Methods</span>
146
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">my_parser</span>(<span class="ruby-identifier">action</span>)
147
+ <span class="ruby-comment"># open and read file</span>
148
+ [
149
+ [ <span class="ruby-string">&#39;echo&#39;</span>, [ <span class="ruby-string">&#39;hello world&#39;</span> ], <span class="ruby-string">&#39;echo &quot;hello world&quot;&#39;</span>, <span class="ruby-value">0</span> ],
150
+ [ <span class="ruby-string">&#39;write&#39;</span>,[ <span class="ruby-string">&#39;id=username&#39;</span>, <span class="ruby-string">&#39;jdoe&#39;</span> ], <span class="ruby-keyword">nil</span> , <span class="ruby-value">1</span> ],
151
+ [ <span class="ruby-string">&#39;write&#39;</span>,[ <span class="ruby-string">&#39;id=password&#39;</span>, <span class="ruby-string">&#39;hello world!&#39;</span> ], <span class="ruby-keyword">nil</span> , <span class="ruby-value">2</span> ]
152
+ ]
153
+ <span class="ruby-keyword">end</span>
154
+ <span class="ruby-keyword">end</span>
155
+ <span class="ruby-comment"># === end parsers/my_parser.rb === #</span>
156
+ </pre>
157
+
106
158
  </section>
107
159
 
108
160
 
@@ -206,7 +258,7 @@
206
258
 
207
259
  <div class="method-description">
208
260
 
209
- <p>Load default Bauxite files.</p>
261
+ <p>Load default <a href="../Bauxite.html">Bauxite</a> files.</p>
210
262
 
211
263
 
212
264
 
@@ -319,7 +371,7 @@
319
371
 
320
372
  <footer id="validator-badges" role="contentinfo">
321
373
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
322
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
374
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
323
375
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
324
376
  </footer>
325
377
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  <section class="description">
85
85
 
86
- <p>Parser common state and behavior.</p>
86
+ <p><a href="Parser.html">Parser</a> common state and behavior.</p>
87
87
 
88
88
  </section>
89
89
 
@@ -197,7 +197,7 @@
197
197
 
198
198
  <footer id="validator-badges" role="contentinfo">
199
199
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
200
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
200
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
201
201
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
202
202
  </footer>
203
203
 
@@ -82,7 +82,7 @@
82
82
  <ul class="link-list">
83
83
 
84
84
 
85
- <li><span class="include">SelectorModule</span>
85
+ <li><a class="include" href="SelectorModule.html">Bauxite::SelectorModule</a>
86
86
 
87
87
 
88
88
  </ul>
@@ -129,12 +129,14 @@ selector method itself. Also, no <code>attr_accessors</code> should be
129
129
  added.</p>
130
130
 
131
131
  <p><a href="Selector.html">Selector</a> methods can use the <code>ctx</code>
132
- attribute to refer to the current test Context. The protected method
133
- selenium_find can also be used to locate elements using standard Selenium
134
- selectors.</p>
132
+ attribute to refer to the current test Context. The protected method <a
133
+ href="SelectorModule.html#method-i-selenium_find">selenium_find</a> can
134
+ also be used to locate elements using standard Selenium selectors.</p>
135
135
 
136
136
  <p><a href="Selector.html">Selector</a> methods should always take a block and
137
- forward that block to a call to either find or selenium_find.</p>
137
+ forward that block to a call to either <a
138
+ href="SelectorModule.html#method-i-find">find</a> or <a
139
+ href="SelectorModule.html#method-i-selenium_find">selenium_find</a>.</p>
138
140
 
139
141
  <p>For example (new selector template):</p>
140
142
 
@@ -416,7 +418,7 @@ selector.</p>
416
418
 
417
419
  <footer id="validator-badges" role="contentinfo">
418
420
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
419
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
421
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
420
422
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
421
423
  </footer>
422
424
 
@@ -187,18 +187,12 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
187
187
  <div class="method-source-code" id="find-source">
188
188
  <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 48</span>
189
189
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">selector</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
190
- <span class="ruby-comment"># I know I should be using Class scope operators to refer to class</span>
191
- <span class="ruby-comment"># methods (i.e. Context::selectors), but for some reason RDoc</span>
192
- <span class="ruby-comment"># refuses to document the Selector class (below) if any such</span>
193
- <span class="ruby-comment"># operators appear in this method (quite strange). So for now, I&#39;ll</span>
194
- <span class="ruby-comment"># just settle for using the old and trusty &quot;.&quot;</span>
195
-
196
190
  <span class="ruby-identifier">data</span> = <span class="ruby-identifier">selector</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;=&#39;</span>, <span class="ruby-value">2</span>)
197
191
  <span class="ruby-identifier">type</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-string">&quot;default&quot;</span>
198
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Invalid selector type &#39;#{type}&#39;&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Context</span>.<span class="ruby-identifier">selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
192
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Invalid selector type &#39;#{type}&#39;&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
199
193
 
200
194
  <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value">-1</span>]
201
- <span class="ruby-identifier">custom_selectors</span> = <span class="ruby-constant">Context</span>.<span class="ruby-identifier">selectors</span>(<span class="ruby-keyword">false</span>)
195
+ <span class="ruby-identifier">custom_selectors</span> = <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">selectors</span>(<span class="ruby-keyword">false</span>)
202
196
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span> , <span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">custom_selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
203
197
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span><span class="ruby-operator">+</span><span class="ruby-string">&#39;_selector&#39;</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">custom_selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span><span class="ruby-operator">+</span><span class="ruby-string">&#39;_selector&#39;</span>
204
198
  <span class="ruby-identifier">selenium_find</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -253,7 +247,7 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
253
247
 
254
248
 
255
249
  <div class="method-source-code" id="selenium_find-source">
256
- <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 81</span>
250
+ <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 75</span>
257
251
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">selenium_find</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">selector</span>)
258
252
  <span class="ruby-identifier">element</span> = <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">find_element</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">selector</span>)
259
253
  <span class="ruby-keyword">yield</span> <span class="ruby-identifier">element</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
@@ -277,7 +271,7 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
277
271
 
278
272
  <footer id="validator-badges" role="contentinfo">
279
273
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
280
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
274
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
281
275
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
282
276
  </footer>
283
277
 
data/doc/Bauxite.html CHANGED
@@ -71,6 +71,8 @@
71
71
 
72
72
  <section class="description">
73
73
 
74
+ <p><a href="Bauxite.html">Bauxite</a> Namespace</p>
75
+
74
76
  </section>
75
77
 
76
78
 
@@ -92,7 +94,7 @@
92
94
 
93
95
  <footer id="validator-badges" role="contentinfo">
94
96
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
95
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
97
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
96
98
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
97
99
  </footer>
98
100