bauxite 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -295,22 +295,28 @@ href="Context.html#method-i-debug">debug</a> console if an error occurs
295
295
  <p>if <code>true</code>, call <a href="Context.html#method-c-wait">::wait</a>
296
296
  before stopping the test engine with <a
297
297
  href="Context.html#method-i-stop">stop</a> (defaults to <code>false</code>)</p>
298
+ </dd><dt>:extensions
299
+ <dd>
300
+ <p>an array of directories that contain extensions to be loaded</p>
298
301
  </dd></dl>
299
302
 
300
303
 
301
304
 
302
305
 
303
306
  <div class="method-source-code" id="new-source">
304
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 69</span>
307
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 70</span>
305
308
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>)
306
309
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
307
310
  <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>
308
311
  <span class="ruby-ivar">@variables</span> = {
309
- <span class="ruby-string">&#39;__TIMEOUT__&#39;</span> =<span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">options</span>[<span class="ruby-value">:timeout</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10</span>).<span class="ruby-identifier">to_i</span>
312
+ <span class="ruby-string">&#39;__TIMEOUT__&#39;</span> =<span class="ruby-operator">&gt;</span> (<span class="ruby-identifier">options</span>[<span class="ruby-value">:timeout</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10</span>).<span class="ruby-identifier">to_i</span>,
313
+ <span class="ruby-string">&#39;__DEBUG__&#39;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">false</span>
310
314
  }
311
315
  <span class="ruby-ivar">@aliases</span> = {}
312
316
  <span class="ruby-ivar">@tests</span> = []
313
317
 
318
+ <span class="ruby-identifier">_load_extensions</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:extensions</span>] <span class="ruby-operator">||</span> [])
319
+
314
320
  <span class="ruby-identifier">handle_errors</span> <span class="ruby-keyword">do</span>
315
321
  <span class="ruby-ivar">@logger</span> = <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_logger</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:logger</span>], <span class="ruby-identifier">options</span>[<span class="ruby-value">:logger_opt</span>])
316
322
  <span class="ruby-keyword">end</span>
@@ -358,7 +364,7 @@ href="Context.html#method-i-stop">stop</a> (defaults to <code>false</code>)</p>
358
364
 
359
365
 
360
366
  <div class="method-source-code" id="debug-source">
361
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 171</span>
367
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 175</span>
362
368
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">debug</span>
363
369
  <span class="ruby-identifier">exec_action</span>(<span class="ruby-string">&#39;debug&#39;</span>, <span class="ruby-keyword">false</span>)
364
370
  <span class="ruby-keyword">end</span></pre>
@@ -415,7 +421,7 @@ applies if no <code>block</code> was given).</p>
415
421
 
416
422
 
417
423
  <div class="method-source-code" id="find-source">
418
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 160</span>
424
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 164</span>
419
425
  <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>
420
426
  <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>
421
427
  <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>)
@@ -465,7 +471,7 @@ the inner text or the value of the <code>value</code> attribute.</p>
465
471
 
466
472
 
467
473
  <div class="method-source-code" id="get_value-source">
468
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 190</span>
474
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 194</span>
469
475
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">element</span>)
470
476
  <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>
471
477
  <span class="ruby-identifier">element</span>.<span class="ruby-identifier">attribute</span>(<span class="ruby-string">&#39;value&#39;</span>)
@@ -508,7 +514,7 @@ the inner text or the value of the <code>value</code> attribute.</p>
508
514
 
509
515
 
510
516
  <div class="method-source-code" id="reset_driver-source">
511
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 115</span>
517
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 119</span>
512
518
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">reset_driver</span>
513
519
  <span class="ruby-ivar">@driver</span>.<span class="ruby-identifier">quit</span>
514
520
  <span class="ruby-identifier">_load_driver</span>
@@ -557,7 +563,7 @@ href="Context.html#method-i-stop">stop</a>).</p>
557
563
 
558
564
 
559
565
  <div class="method-source-code" id="start-source">
560
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 97</span>
566
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 101</span>
561
567
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">actions</span> = [])
562
568
  <span class="ruby-identifier">_load_driver</span>
563
569
  <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>
@@ -616,7 +622,7 @@ href="Context.html#method-i-stop">stop</a> pattern.</p>
616
622
 
617
623
 
618
624
  <div class="method-source-code" id="stop-source">
619
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 135</span>
625
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 139</span>
620
626
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">stop</span>
621
627
  <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>]
622
628
  <span class="ruby-ivar">@driver</span>.<span class="ruby-identifier">quit</span>
@@ -682,7 +688,7 @@ logger type.</p>
682
688
 
683
689
 
684
690
  <div class="method-source-code" id="load_logger-source">
685
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 365</span>
691
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 371</span>
686
692
  <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>)
687
693
  <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>
688
694
 
@@ -739,7 +745,7 @@ arguments.</p>
739
745
 
740
746
 
741
747
  <div class="method-source-code" id="parse_args-source">
742
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 267</span>
748
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 271</span>
743
749
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parse_args</span>(<span class="ruby-identifier">line</span>)
744
750
  <span class="ruby-comment"># col_sep must be a regex because String.split has a special case for</span>
745
751
  <span class="ruby-comment"># a single space char (&#39; &#39;) that produced unexpected results (i.e.</span>
@@ -791,7 +797,7 @@ arguments.</p>
791
797
 
792
798
 
793
799
  <div class="method-source-code" id="wait-source">
794
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 358</span>
800
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 364</span>
795
801
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">wait</span>
796
802
  <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
803
  <span class="ruby-keyword">end</span></pre>
@@ -843,7 +849,7 @@ behavior).</p>
843
849
 
844
850
 
845
851
  <div class="method-source-code" id="exec_action-source">
846
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 212</span>
852
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 216</span>
847
853
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">log</span> = <span class="ruby-keyword">true</span>)
848
854
  <span class="ruby-keyword">if</span> (<span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>)
849
855
  <span class="ruby-identifier">action</span> = { <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">action</span>, <span class="ruby-value">:file</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&#39;&lt;unknown&gt;&#39;</span>, <span class="ruby-value">:line</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> }
@@ -919,7 +925,7 @@ handler will not exit after printing the error message.</p>
919
925
 
920
926
 
921
927
  <div class="method-source-code" id="handle_errors-source">
922
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 303</span>
928
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 307</span>
923
929
  <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>)
924
930
  <span class="ruby-keyword">yield</span>
925
931
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
@@ -932,13 +938,15 @@ handler will not exit after printing the error message.</p>
932
938
  <span class="ruby-identifier">p</span> <span class="ruby-identifier">e</span>
933
939
  <span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">backtrace</span>
934
940
  <span class="ruby-keyword">end</span>
935
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">break_into_debug</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value">:debug</span>]
936
- <span class="ruby-identifier">debug</span>
937
- <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">exit_on_error</span>
938
- <span class="ruby-keyword">if</span> <span class="ruby-ivar">@variables</span>[<span class="ruby-string">&#39;__RAISE_ERROR__&#39;</span>]
939
- <span class="ruby-identifier">raise</span>
940
- <span class="ruby-keyword">else</span>
941
- <span class="ruby-identifier">exit</span> <span class="ruby-keyword">false</span>
941
+ <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@variables</span>[<span class="ruby-string">&#39;__DEBUG__&#39;</span>]
942
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">break_into_debug</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value">:debug</span>]
943
+ <span class="ruby-identifier">debug</span>
944
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">exit_on_error</span>
945
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@variables</span>[<span class="ruby-string">&#39;__RAISE_ERROR__&#39;</span>]
946
+ <span class="ruby-identifier">raise</span>
947
+ <span class="ruby-keyword">else</span>
948
+ <span class="ruby-identifier">exit</span> <span class="ruby-keyword">false</span>
949
+ <span class="ruby-keyword">end</span>
942
950
  <span class="ruby-keyword">end</span>
943
951
  <span class="ruby-keyword">end</span>
944
952
  <span class="ruby-keyword">end</span></pre>
@@ -979,7 +987,7 @@ handler will not exit after printing the error message.</p>
979
987
 
980
988
 
981
989
  <div class="method-source-code" id="parse_file-source">
982
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 247</span>
990
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 251</span>
983
991
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">parse_file</span>(<span class="ruby-identifier">file</span>)
984
992
  <span class="ruby-keyword">if</span> (<span class="ruby-identifier">file</span> <span class="ruby-operator">==</span> <span class="ruby-string">&#39;stdin&#39;</span>)
985
993
  <span class="ruby-identifier">_parse_file</span>(<span class="ruby-identifier">$stdin</span>, <span class="ruby-identifier">file</span>)
@@ -1027,7 +1035,7 @@ to execute the block itself.</p>
1027
1035
 
1028
1036
 
1029
1037
  <div class="method-source-code" id="with_timeout-source">
1030
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 337</span>
1038
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 343</span>
1031
1039
  <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>)
1032
1040
  <span class="ruby-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
1033
1041
  <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>]
@@ -1108,7 +1116,7 @@ to execute the block itself.</p>
1108
1116
 
1109
1117
 
1110
1118
  <div class="method-source-code" id="action_args-source">
1111
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 398</span>
1119
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 404</span>
1112
1120
  <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>)
1113
1121
  <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>
1114
1122
  <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> }
@@ -1148,7 +1156,7 @@ to execute the block itself.</p>
1148
1156
 
1149
1157
 
1150
1158
  <div class="method-source-code" id="actions-source">
1151
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 388</span>
1159
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 394</span>
1152
1160
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">actions</span>
1153
1161
  <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>) }
1154
1162
  <span class="ruby-keyword">end</span></pre>
@@ -1187,7 +1195,7 @@ to execute the block itself.</p>
1187
1195
 
1188
1196
 
1189
1197
  <div class="method-source-code" id="loggers-source">
1190
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 427</span>
1198
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 433</span>
1191
1199
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">loggers</span>
1192
1200
  <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>) }
1193
1201
  <span class="ruby-keyword">end</span></pre>
@@ -1229,7 +1237,7 @@ to execute the block itself.</p>
1229
1237
 
1230
1238
 
1231
1239
  <div class="method-source-code" id="max_action_name_size-source">
1232
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 439</span>
1240
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 445</span>
1233
1241
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">max_action_name_size</span>
1234
1242
  <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> }
1235
1243
  <span class="ruby-keyword">end</span></pre>
@@ -1272,7 +1280,7 @@ custom selectors are returned.</p>
1272
1280
 
1273
1281
 
1274
1282
  <div class="method-source-code" id="selectors-source">
1275
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 413</span>
1283
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 419</span>
1276
1284
  <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>)
1277
1285
  <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>) }
1278
1286
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">include_standard_selectors</span>
@@ -1354,7 +1362,7 @@ with the corresponding variable value.</p>
1354
1362
 
1355
1363
 
1356
1364
  <div class="method-source-code" id="expand-source">
1357
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 460</span>
1365
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 466</span>
1358
1366
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">expand</span>(<span class="ruby-identifier">s</span>)
1359
1367
  <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>
1360
1368
  <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>)
@@ -1407,7 +1415,7 @@ variables is restored.</p>
1407
1415
 
1408
1416
 
1409
1417
  <div class="method-source-code" id="with_vars-source">
1410
- <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 483</span>
1418
+ <pre><span class="ruby-comment"># File lib/bauxite/core/Context.rb, line 489</span>
1411
1419
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">with_vars</span>(<span class="ruby-identifier">vars</span>)
1412
1420
  <span class="ruby-identifier">current</span> = <span class="ruby-ivar">@variables</span>
1413
1421
  <span class="ruby-ivar">@variables</span> = <span class="ruby-ivar">@variables</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">vars</span>)
@@ -254,14 +254,16 @@
254
254
 
255
255
 
256
256
  <div class="method-source-code" id="_screen_width-source">
257
- <pre><span class="ruby-comment"># File lib/bauxite/loggers/xterm.rb, line 71</span>
257
+ <pre><span class="ruby-comment"># File lib/bauxite/loggers/xterm.rb, line 76</span>
258
258
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">_screen_width</span>
259
- <span class="ruby-keyword">begin</span>
260
- <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;terminfo&#39;</span>
261
- <span class="ruby-constant">TermInfo</span>.<span class="ruby-identifier">screen_size</span>[<span class="ruby-value">1</span>]
262
- <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span>
259
+ <span class="ruby-keyword">if</span> <span class="ruby-constant">RbConfig</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-string">&#39;host_os&#39;</span>] <span class="ruby-operator">=~</span>
260
+ <span class="ruby-regexp">/(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i</span>
261
+ (<span class="ruby-identifier">_dynamic_width_stty</span>.<span class="ruby-identifier">nonzero?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">_dynamic_width_tput</span>)
262
+ <span class="ruby-keyword">else</span>
263
263
  <span class="ruby-keyword">super</span>
264
264
  <span class="ruby-keyword">end</span>
265
+ <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
266
+ <span class="ruby-keyword">super</span>
265
267
  <span class="ruby-keyword">end</span></pre>
266
268
  </div>
267
269
 
data/doc/created.rid CHANGED
@@ -1,37 +1,38 @@
1
- Sat, 25 Jan 2014 13:18:13 -0300
2
- lib/bauxite/core/Action.rb Sat, 25 Jan 2014 12:19:06 -0300
3
- lib/bauxite/core/Context.rb Sat, 25 Jan 2014 12:19:06 -0300
4
- lib/bauxite/core/Errors.rb Sat, 25 Jan 2014 12:19:06 -0300
5
- lib/bauxite/core/Logger.rb Sat, 25 Jan 2014 12:19:06 -0300
6
- lib/bauxite/core/Selector.rb Sat, 25 Jan 2014 12:19:06 -0300
7
- lib/bauxite/actions/alias.rb Sat, 25 Jan 2014 12:19:06 -0300
8
- lib/bauxite/actions/assert.rb Sat, 25 Jan 2014 12:19:06 -0300
9
- lib/bauxite/actions/assertv.rb Sat, 25 Jan 2014 12:19:06 -0300
10
- lib/bauxite/actions/break.rb Sat, 25 Jan 2014 12:19:06 -0300
11
- lib/bauxite/actions/click.rb Sat, 25 Jan 2014 12:19:06 -0300
12
- lib/bauxite/actions/debug.rb Sat, 25 Jan 2014 12:19:06 -0300
13
- lib/bauxite/actions/echo.rb Sat, 25 Jan 2014 12:19:06 -0300
14
- lib/bauxite/actions/exec.rb Sat, 25 Jan 2014 12:19:06 -0300
15
- lib/bauxite/actions/js.rb Sat, 25 Jan 2014 12:19:06 -0300
16
- lib/bauxite/actions/load.rb Sat, 25 Jan 2014 12:19:06 -0300
17
- lib/bauxite/actions/open.rb Sat, 25 Jan 2014 12:19:06 -0300
18
- lib/bauxite/actions/params.rb Sat, 25 Jan 2014 12:19:06 -0300
19
- lib/bauxite/actions/replace.rb Sat, 25 Jan 2014 12:19:06 -0300
20
- lib/bauxite/actions/reset.rb Sat, 25 Jan 2014 12:19:06 -0300
21
- lib/bauxite/actions/return.rb Sat, 25 Jan 2014 12:19:06 -0300
22
- lib/bauxite/actions/ruby.rb Sat, 25 Jan 2014 12:19:06 -0300
23
- lib/bauxite/actions/set.rb Sat, 25 Jan 2014 12:19:06 -0300
24
- lib/bauxite/actions/source.rb Sat, 25 Jan 2014 12:19:06 -0300
25
- lib/bauxite/actions/store.rb Sat, 25 Jan 2014 12:19:06 -0300
26
- lib/bauxite/actions/test.rb Sat, 25 Jan 2014 12:19:06 -0300
27
- lib/bauxite/actions/tryload.rb Sat, 25 Jan 2014 12:19:06 -0300
28
- lib/bauxite/actions/wait.rb Sat, 25 Jan 2014 12:19:06 -0300
29
- lib/bauxite/actions/write.rb Sat, 25 Jan 2014 12:19:06 -0300
30
- lib/bauxite/selectors/attr.rb Sat, 25 Jan 2014 12:19:06 -0300
31
- lib/bauxite/selectors/default.rb Sat, 25 Jan 2014 12:19:06 -0300
32
- lib/bauxite/selectors/frame.rb Sat, 25 Jan 2014 12:19:06 -0300
33
- lib/bauxite/loggers/composite.rb Sat, 25 Jan 2014 12:19:06 -0300
34
- lib/bauxite/loggers/echo.rb Sat, 25 Jan 2014 12:19:06 -0300
35
- lib/bauxite/loggers/file.rb Sat, 25 Jan 2014 12:19:06 -0300
36
- lib/bauxite/loggers/terminal.rb Sat, 25 Jan 2014 12:19:06 -0300
37
- lib/bauxite/loggers/xterm.rb Sat, 25 Jan 2014 12:19:06 -0300
1
+ Sun, 26 Jan 2014 13:54:26 -0300
2
+ lib/bauxite/actions/break.rb Sun, 26 Jan 2014 13:53:54 -0300
3
+ lib/bauxite/actions/assert.rb Sun, 26 Jan 2014 13:53:54 -0300
4
+ lib/bauxite/actions/wait.rb Sun, 26 Jan 2014 13:53:54 -0300
5
+ lib/bauxite/actions/assertv.rb Sun, 26 Jan 2014 13:53:54 -0300
6
+ lib/bauxite/actions/open.rb Sun, 26 Jan 2014 13:53:54 -0300
7
+ lib/bauxite/actions/return.rb Sun, 26 Jan 2014 13:53:54 -0300
8
+ lib/bauxite/actions/ruby.rb Sun, 26 Jan 2014 13:53:54 -0300
9
+ lib/bauxite/actions/echo.rb Sun, 26 Jan 2014 13:53:54 -0300
10
+ lib/bauxite/actions/js.rb Sun, 26 Jan 2014 13:53:54 -0300
11
+ lib/bauxite/actions/replace.rb Sun, 26 Jan 2014 13:53:54 -0300
12
+ lib/bauxite/actions/write.rb Sun, 26 Jan 2014 13:53:54 -0300
13
+ lib/bauxite/actions/params.rb Sun, 26 Jan 2014 13:53:54 -0300
14
+ lib/bauxite/actions/set.rb Sun, 26 Jan 2014 13:53:54 -0300
15
+ lib/bauxite/actions/click.rb Sun, 26 Jan 2014 13:53:54 -0300
16
+ lib/bauxite/actions/reset.rb Sun, 26 Jan 2014 13:53:54 -0300
17
+ lib/bauxite/actions/debug.rb Sun, 26 Jan 2014 13:53:54 -0300
18
+ lib/bauxite/actions/source.rb Sun, 26 Jan 2014 13:53:54 -0300
19
+ lib/bauxite/actions/exec.rb Sun, 26 Jan 2014 13:53:54 -0300
20
+ lib/bauxite/actions/store.rb Sun, 26 Jan 2014 13:53:54 -0300
21
+ lib/bauxite/actions/tryload.rb Sun, 26 Jan 2014 13:53:54 -0300
22
+ lib/bauxite/actions/load.rb Sun, 26 Jan 2014 13:53:54 -0300
23
+ lib/bauxite/actions/test.rb Sun, 26 Jan 2014 13:53:54 -0300
24
+ lib/bauxite/actions/alias.rb Sun, 26 Jan 2014 13:53:54 -0300
25
+ lib/bauxite/application.rb Sun, 26 Jan 2014 13:53:54 -0300
26
+ lib/bauxite/core/Context.rb Sun, 26 Jan 2014 13:53:54 -0300
27
+ lib/bauxite/core/Errors.rb Sun, 26 Jan 2014 13:53:54 -0300
28
+ lib/bauxite/core/Logger.rb Sun, 26 Jan 2014 13:53:54 -0300
29
+ lib/bauxite/core/Selector.rb Sun, 26 Jan 2014 13:53:54 -0300
30
+ lib/bauxite/core/Action.rb Sun, 26 Jan 2014 13:53:54 -0300
31
+ lib/bauxite/selectors/attr.rb Sun, 26 Jan 2014 13:53:54 -0300
32
+ lib/bauxite/selectors/default.rb Sun, 26 Jan 2014 13:53:54 -0300
33
+ lib/bauxite/selectors/frame.rb Sun, 26 Jan 2014 13:53:54 -0300
34
+ lib/bauxite/loggers/terminal.rb Sun, 26 Jan 2014 13:53:54 -0300
35
+ lib/bauxite/loggers/file.rb Sun, 26 Jan 2014 13:53:54 -0300
36
+ lib/bauxite/loggers/composite.rb Sun, 26 Jan 2014 13:53:54 -0300
37
+ lib/bauxite/loggers/echo.rb Sun, 26 Jan 2014 13:53:54 -0300
38
+ lib/bauxite/loggers/xterm.rb Sun, 26 Jan 2014 13:53:54 -0300
data/doc/index.html CHANGED
@@ -65,6 +65,8 @@
65
65
 
66
66
  <li><a href="./Bauxite/ActionModule.html">Bauxite::ActionModule</a>
67
67
 
68
+ <li><a href="./Bauxite/Application.html">Bauxite::Application</a>
69
+
68
70
  <li><a href="./Bauxite/Context.html">Bauxite::Context</a>
69
71
 
70
72
  <li><a href="./Bauxite/Errors.html">Bauxite::Errors</a>
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["bauxite","action","actionmodule","context","errors","assertionerror","filenotfounderror","loggers","compositelogger","echologger","filelogger","nulllogger","terminallogger","xtermlogger","selector","selectormodule","_block()","_cmd_color()","_fmt()","_fmt()","_restore_cursor()","_restore_cursor()","_save_cursor()","_save_cursor()","_screen_width()","_screen_width()","action_args()","actions()","alias_action()","args()","assert()","assertv()","attr()","break_action()","click()","debug()","debug()","debug_prompt()","debug_prompt()","debug_prompt()","default()","echo()","exec()","exec_action()","execute()","expand()","find()","find()","frame()","get_value()","handle_errors()","js()","load()","load_logger()","log()","log()","log()","log_cmd()","log_cmd()","log_cmd()","log_cmd()","log_cmd()","loggers()","max_action_name_size()","new()","new()","new()","new()","new()","new()","new()","open()","params()","parse_args()","parse_file()","progress()","progress()","progress()","replace()","reset()","reset_driver()","return_action()","ruby()","selectors()","selenium_find()","set()","source()","start()","stop()","store()","test()","tryload()","wait()","wait()","with_timeout()","with_vars()","write()"],"longSearchIndex":["bauxite","bauxite::action","bauxite::actionmodule","bauxite::context","bauxite::errors","bauxite::errors::assertionerror","bauxite::errors::filenotfounderror","bauxite::loggers","bauxite::loggers::compositelogger","bauxite::loggers::echologger","bauxite::loggers::filelogger","bauxite::loggers::nulllogger","bauxite::loggers::terminallogger","bauxite::loggers::xtermlogger","bauxite::selector","bauxite::selectormodule","bauxite::loggers::terminallogger#_block()","bauxite::loggers::terminallogger#_cmd_color()","bauxite::loggers::terminallogger#_fmt()","bauxite::loggers::xtermlogger#_fmt()","bauxite::loggers::terminallogger#_restore_cursor()","bauxite::loggers::xtermlogger#_restore_cursor()","bauxite::loggers::terminallogger#_save_cursor()","bauxite::loggers::xtermlogger#_save_cursor()","bauxite::loggers::terminallogger#_screen_width()","bauxite::loggers::xtermlogger#_screen_width()","bauxite::context::action_args()","bauxite::context::actions()","bauxite::action#alias_action()","bauxite::actionmodule#args()","bauxite::action#assert()","bauxite::action#assertv()","bauxite::selector#attr()","bauxite::action#break_action()","bauxite::action#click()","bauxite::action#debug()","bauxite::context#debug()","bauxite::loggers::compositelogger#debug_prompt()","bauxite::loggers::nulllogger#debug_prompt()","bauxite::loggers::terminallogger#debug_prompt()","bauxite::selector#default()","bauxite::action#echo()","bauxite::action#exec()","bauxite::context#exec_action()","bauxite::actionmodule#execute()","bauxite::context#expand()","bauxite::context#find()","bauxite::selectormodule#find()","bauxite::selector#frame()","bauxite::context#get_value()","bauxite::context#handle_errors()","bauxite::action#js()","bauxite::action#load()","bauxite::context::load_logger()","bauxite::loggers::compositelogger#log()","bauxite::loggers::nulllogger#log()","bauxite::loggers::terminallogger#log()","bauxite::loggers::compositelogger#log_cmd()","bauxite::loggers::echologger#log_cmd()","bauxite::loggers::filelogger#log_cmd()","bauxite::loggers::nulllogger#log_cmd()","bauxite::loggers::terminallogger#log_cmd()","bauxite::context::loggers()","bauxite::context::max_action_name_size()","bauxite::actionmodule::new()","bauxite::context::new()","bauxite::loggers::compositelogger::new()","bauxite::loggers::filelogger::new()","bauxite::loggers::nulllogger::new()","bauxite::loggers::terminallogger::new()","bauxite::selectormodule::new()","bauxite::action#open()","bauxite::action#params()","bauxite::context::parse_args()","bauxite::context#parse_file()","bauxite::loggers::compositelogger#progress()","bauxite::loggers::nulllogger#progress()","bauxite::loggers::terminallogger#progress()","bauxite::action#replace()","bauxite::action#reset()","bauxite::context#reset_driver()","bauxite::action#return_action()","bauxite::action#ruby()","bauxite::context::selectors()","bauxite::selectormodule#selenium_find()","bauxite::action#set()","bauxite::action#source()","bauxite::context#start()","bauxite::context#stop()","bauxite::action#store()","bauxite::action#test()","bauxite::action#tryload()","bauxite::action#wait()","bauxite::context::wait()","bauxite::context#with_timeout()","bauxite::context#with_vars()","bauxite::action#write()"],"info":[["Bauxite","","Bauxite.html","",""],["Bauxite::Action","","Bauxite/Action.html","","<p>Test action class.\n<p>Test actions are basic test operations that can be combined to create a\ntest case. …\n"],["Bauxite::ActionModule","","Bauxite/ActionModule.html","","<p>Action common state and behavior.\n"],["Bauxite::Context","","Bauxite/Context.html","","<p>The Main test context. This class includes state and helper functions used\nby clients execute tests and …\n"],["Bauxite::Errors","","Bauxite/Errors.html","","<p>Errors Module\n"],["Bauxite::Errors::AssertionError","","Bauxite/Errors/AssertionError.html","","<p>Error raised when an assertion fails.\n"],["Bauxite::Errors::FileNotFoundError","","Bauxite/Errors/FileNotFoundError.html","","<p>Error raised when an invalid file tried to be loaded.\n"],["Bauxite::Loggers","","Bauxite/Loggers.html","","<p>Test loggers module\n<p>The default Logger class and all custom loggers must be included in this\nmodule.\n"],["Bauxite::Loggers::CompositeLogger","","Bauxite/Loggers/CompositeLogger.html","","<p>Composite logger.\n<p>This composite logger forwards logging calls to each of its children.\n<p>Set the <code>:loggers</code> …\n"],["Bauxite::Loggers::EchoLogger","","Bauxite/Loggers/EchoLogger.html","","<p>Echo logger.\n<p>This logger outputs the raw action text for every action executed.\n<p>Note that this logger does …\n"],["Bauxite::Loggers::FileLogger","","Bauxite/Loggers/FileLogger.html","","<p>File logger.\n<p>This logger outputs the raw action text for every action executed to the\nfile specified in …\n"],["Bauxite::Loggers::NullLogger","","Bauxite/Loggers/NullLogger.html","","<p>Test logger class.\n<p>Test loggers handle test output format.\n<p>The default logger does not provide any output …\n"],["Bauxite::Loggers::TerminalLogger","","Bauxite/Loggers/TerminalLogger.html","","<p>Terminal logger.\n<p>This logger outputs text using basic text formatting for a terminal window.\n"],["Bauxite::Loggers::XtermLogger","","Bauxite/Loggers/XtermLogger.html","","<p>XTerm logger.\n<p>This logger outputs colorized lines using xterm (VT100/2) escape sequences.\n"],["Bauxite::Selector","","Bauxite/Selector.html","","<p>Selector class.\n<p>Selectors represent different strategies for finding elements. Selenium\nprovides a list …\n"],["Bauxite::SelectorModule","","Bauxite/SelectorModule.html","","<p>Selector common state and behavior.\n"],["_block","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_block","(color, text, size)","<p>Prints <code>text</code> centered inside a square-bracketed block.\n"],["_cmd_color","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_cmd_color","(cmd)","<p>Get the color of <code>cmd</code>.\n"],["_fmt","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_fmt","(color, text, size = 0)","<p>Centers <code>text</code> to a fixed size with.\n"],["_fmt","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_fmt","(color, text, size = 0)",""],["_restore_cursor","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_restore_cursor","()","<p>Restores the cursor to the previously saved cursor position.\n"],["_restore_cursor","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_restore_cursor","()",""],["_save_cursor","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_save_cursor","()","<p>Save the current cursor position,\n"],["_save_cursor","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_save_cursor","()",""],["_screen_width","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_screen_width","()","<p>Returns the terminal screen width.\n"],["_screen_width","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_screen_width","()",""],["action_args","Bauxite::Context","Bauxite/Context.html#method-c-action_args","(action)","<p>Returns an array with the names of the arguments of the specified action.\n<p>For example:\n\n<pre>Context::action_args ...</pre>\n"],["actions","Bauxite::Context","Bauxite/Context.html#method-c-actions","()","<p>Returns an array with the names of every action available.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">actions</span>\n<span class=\"ruby-comment\"># =&gt; [ &quot;assert&quot;, ...</span>\n</pre>\n"],["alias_action","Bauxite::Action","Bauxite/Action.html#method-i-alias_action","(name, action, *args)","<p>Aliases <code>name</code> to <code>action</code> with additional arguments.\n<p>In <code>args</code> the variables <code>${1}</code>..<code>${n}</code>\nwill be expanded to …\n"],["args","Bauxite::ActionModule","Bauxite/ActionModule.html#method-i-args","(quote = false)","<p>Returns the action arguments after applying variable expansion.\n<p>See Context#expand.\n<p>If <code>quote</code> is <code>true</code>, the …\n"],["assert","Bauxite::Action","Bauxite/Action.html#method-i-assert","(selector, text)","<p>Asserts that the value of the selected element matches <code>text</code>.\n<p><code>text</code> is a regular expression. <code>text</code> can be …\n"],["assertv","Bauxite::Action","Bauxite/Action.html#method-i-assertv","(expected, actual)","<p>Asserts that the <code>actual</code> text matches the <code>expected</code>\ntext.\n<p><code>expected</code> can be a regular expression. See #assert …\n"],["attr","Bauxite::Selector","Bauxite/Selector.html#method-i-attr","(arg, &block)","<p>Select an element by attribute value.\n<p>The attribute selector syntax is:\n\n<pre>attr=name:value</pre>\n"],["break_action","Bauxite::Action","Bauxite/Action.html#method-i-break_action","()","<p>Prompts the user to press ENTER before resuming execution.\n<p>Note that this method provides an action named …\n"],["click","Bauxite::Action","Bauxite/Action.html#method-i-click","(selector)","<p>Triggers the <code>click</code> event on the selected element.\n<p>For example:\n\n<pre># assuming &lt;button type=&quot;button&quot; id=&quot;btn&quot;&gt;click ...</pre>\n"],["debug","Bauxite::Action","Bauxite/Action.html#method-i-debug","()","<p>Breaks into the debug console.\n<p>In the debug console you can type action strings and test their result. …\n"],["debug","Bauxite::Context","Bauxite/Context.html#method-i-debug","()","<p>Breaks into the debug console.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">ctx</span>.<span class=\"ruby-identifier\">debug</span>\n<span class=\"ruby-comment\"># =&gt; this breaks into the debug console</span>\n</pre>\n"],["debug_prompt","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-debug_prompt","()","<p>Returns a colorized debug prompt.\n<p>This implementation returns the debug_prompt of the first logger.\n"],["debug_prompt","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-debug_prompt","()","<p>Returns the prompt shown by the debug console (see Context#debug).\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">log</span>.<span class=\"ruby-identifier\">debug_prompt</span>\n<span class=\"ruby-comment\"># =&gt; returns ...</span>\n</pre>\n"],["debug_prompt","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-debug_prompt","()","<p>Returns a colorized debug prompt.\n"],["default","Bauxite::Selector","Bauxite/Selector.html#method-i-default","(arg, &block)","<p>Select an element by id suffix.\n<p>This is the default selector. Any selector strings that do not contain …\n"],["echo","Bauxite::Action","Bauxite/Action.html#method-i-echo","(text)","<p>Prints the value of the specified <code>text</code>.\n<p><code>text</code> is subject to variable expansion (see Context#expand).\n<p>For …\n"],["exec","Bauxite::Action","Bauxite/Action.html#method-i-exec","(*command)","<p>Executes <code>command</code>, optionally storing the results in a\nvariable.\n<p>If the first argument of <code>command</code> is <code>name=...</code> …\n"],["exec_action","Bauxite::Context","Bauxite/Context.html#method-i-exec_action","(action, log = true)","<p>Executes the specified action handling errors, logging and debug history.\nActions can be obtained by …\n"],["execute","Bauxite::ActionModule","Bauxite/ActionModule.html#method-i-execute","()","<p>Executes the action evaluating the arguments in the current context.\n<p>Note that #execute calls #args to …\n"],["expand","Bauxite::Context","Bauxite/Context.html#method-i-expand","(s)","<p>Recursively replaces occurencies of variable expansions in <code>s</code>\nwith the corresponding variable value.\n<p>The …\n"],["find","Bauxite::Context","Bauxite/Context.html#method-i-find","(selector)","<p>Finds an element by <code>selector</code>.\n<p>The element found is yielded to the given <code>block</code> (if any) and\nreturned.\n<p>Note …\n"],["find","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-i-find","(selector, &block)","<p>Searches for elements using the specified selector string.\n<p>For more information see Context#find.\n<p>Selectors …\n"],["frame","Bauxite::Selector","Bauxite/Selector.html#method-i-frame","(arg, &block)","<p>Change the selector scope to the given frame and finds an element in that\nframe.\n<p>This is a composite selector. …\n"],["get_value","Bauxite::Context","Bauxite/Context.html#method-i-get_value","(element)","<p>Returns the value of the specified <code>element</code>.\n<p>This method takes into account the type of element and selectively …\n"],["handle_errors","Bauxite::Context","Bauxite/Context.html#method-i-handle_errors","(break_into_debug = false, exit_on_error = true)","<p>Executes the <code>block</code> inside a rescue block applying standard\ncriteria of error handling.\n<p>The default behavior …\n"],["js","Bauxite::Action","Bauxite/Action.html#method-i-js","(script, name = nil)","<p>Executes the specified Javascript <code>script</code>, optionally storing\nthe results the variable named <code>name</code>.\n<p>Note …\n"],["load","Bauxite::Action","Bauxite/Action.html#method-i-load","(file, *vars)","<p>Load the specified file into an isolated variable context and execute the\nactions specified. If the file …\n"],["load_logger","Bauxite::Context","Bauxite/Context.html#method-c-load_logger","(name, options)","<p>Constructs a Logger instance using <code>name</code> as a hint for the\nlogger type.\n"],["log","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-log","(s, type = :info)","<p>Prints the specified string.\n<p>See Bauxite::Loggers::NullLogger#print\n"],["log","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-log","(s, type = :info)","<p>Logs the specified string.\n<p><code>type</code>, if specified, should be one of <code>:error</code>,\n<code>:warning</code>, <code>:info</code> (default), <code>:debug</code> …\n"],["log","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-log","(s, type = :info)","<p>Prints the specified string.\n<p>See Bauxite::Loggers::NullLogger#print\n"],["log_cmd","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-log_cmd","(action, &block)","<p>Pretty prints action information and status.\n<p>This implementation only yileds in the first logger.\n<p>Additional …\n"],["log_cmd","Bauxite::Loggers::EchoLogger","Bauxite/Loggers/EchoLogger.html#method-i-log_cmd","(action)","<p>Echoes the raw action text.\n"],["log_cmd","Bauxite::Loggers::FileLogger","Bauxite/Loggers/FileLogger.html#method-i-log_cmd","(action)","<p>Echoes the raw action text.\n"],["log_cmd","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-log_cmd","(action)","<p>Executes the given block in a logging context.\n<p>This default implementation does not provide any logging …\n"],["log_cmd","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-log_cmd","(action)","<p>Pretty prints action information and status.\n"],["loggers","Bauxite::Context","Bauxite/Context.html#method-c-loggers","()","<p>Returns an array with the names of every logger available.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">loggers</span>\n<span class=\"ruby-comment\"># =&gt; [ &quot;null&quot;, ...</span>\n</pre>\n"],["max_action_name_size","Bauxite::Context","Bauxite/Context.html#method-c-max_action_name_size","()","<p>Returns the maximum size in characters of an action name.\n<p>This method is useful to pretty print lists …\n"],["new","Bauxite::ActionModule","Bauxite/ActionModule.html#method-c-new","(ctx, cmd, args, text, file, line)","<p>Constructs a new test action instance.\n"],["new","Bauxite::Context","Bauxite/Context.html#method-c-new","(options)","<p>Constructs a new test context instance.\n<p><code>options</code> is a hash with the following values:\n<p>:driver &mdash; selenium driver …\n"],["new","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-c-new","(options)","<p>Constructs a new composite logger instance.\n"],["new","Bauxite::Loggers::FileLogger","Bauxite/Loggers/FileLogger.html#method-c-new","(options)","<p>Constructs a new echo logger instance.\n"],["new","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-c-new","(options)","<p>Constructs a new null logger instance.\n"],["new","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-c-new","(options)","<p>Constructs a new Terminal logger instance.\n"],["new","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-c-new","(ctx)","<p>Constructs a new test selector instance.\n"],["open","Bauxite::Action","Bauxite/Action.html#method-i-open","(url)","<p>Opens the specified <code>url</code> in the browser.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">open</span> <span class=\"ruby-string\">&quot;http://www.ruby-lang.org&quot;</span>\n<span class=\"ruby-comment\"># =&gt; this would open ...</span>\n</pre>\n"],["params","Bauxite::Action","Bauxite/Action.html#method-i-params","(*vars)","<p>Asserts that the variables named <code>vars</code> are defined and not\nempty.\n<p>For example:\n\n<pre>params host db_name username ...</pre>\n"],["parse_args","Bauxite::Context","Bauxite/Context.html#method-c-parse_args","(line)","<p>Parses a line of action text into an array. The input <code>line</code>\nshould be a space-separated list of values, …\n"],["parse_file","Bauxite::Context","Bauxite/Context.html#method-i-parse_file","(file)","<p>Parses the specified text into a test action array.\n<p>See #parse_action for more details.\n<p>For example:\n"],["progress","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-progress","(value)","<p>Updates action progress.\n"],["progress","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-progress","(value)","<p>Updates the progress of the current action.\n"],["progress","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-progress","(value)","<p>Updates action progress.\n"],["replace","Bauxite::Action","Bauxite/Action.html#method-i-replace","(text, pattern, replacement, name)","<p>Replaces the occurrences of <code>pattern</code> in <code>text</code> with\n<code>replacement</code> and assigns the result to the variable named …\n"],["reset","Bauxite::Action","Bauxite/Action.html#method-i-reset","()","<p>Resets the test engine by closing and reopening the browser. As a side\neffect of resetting the test engine, …\n"],["reset_driver","Bauxite::Context","Bauxite/Context.html#method-i-reset_driver","()","<p>Stops the test engine and starts a new engine with the same provider.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">ctx</span>.<span class=\"ruby-identifier\">reset_driver</span>\n=<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-operator\">...</span>\n</pre>\n"],["return_action","Bauxite::Action","Bauxite/Action.html#method-i-return_action","(*vars)","<p>Returns the specified variables to the parent scope (if any).\n<p>If <code>vars</code> is <code>*</code> every variable defined in the …\n"],["ruby","Bauxite::Action","Bauxite/Action.html#method-i-ruby","(file, *vars)","<p>Load the specified ruby file into an isolated variable context and execute\nthe ruby code.\n<p><code>file</code> can be …\n"],["selectors","Bauxite::Context","Bauxite/Context.html#method-c-selectors","(include_standard_selectors = true)","<p>Returns an array with the names of every selector available.\n<p>If <code>include_standard_selectors</code> is <code>true</code> (default …\n"],["selenium_find","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-i-selenium_find","(type, selector)","<p>Searches for elements using standard Selenium selectors.\n<p>Selectors calling this method should forward …\n"],["set","Bauxite::Action","Bauxite/Action.html#method-i-set","(name, value)","<p>Sets the variable named <code>name</code> to the <code>value</code>\nspecified.\n<p>Both <code>name</code> and <code>value</code> are subject to variable\nexpansion …\n"],["source","Bauxite::Action","Bauxite/Action.html#method-i-source","(text)","<p>Asserts that the page source matches <code>text</code>.\n<p><code>text</code> can be a regular expression. See #assert for more\ndetails. …\n"],["start","Bauxite::Context","Bauxite/Context.html#method-i-start","(actions = [])","<p>Starts the test engine and executes the actions specified. If no action was\nspecified, returns without …\n"],["stop","Bauxite::Context","Bauxite/Context.html#method-i-stop","()","<p>Stops the test engine.\n<p>Calling this method at the end of the test is mandatory if #start was\ncalled without …\n"],["store","Bauxite::Action","Bauxite/Action.html#method-i-store","(selector, name)","<p>Sets the variable named <code>name</code> to the value of the selected\nelement.\n<p><code>name</code> is subject to variable expansion …\n"],["test","Bauxite::Action","Bauxite/Action.html#method-i-test","(file, name = nil)","<p>Load <code>file</code> using the #load action into a new test context.\n<p>If <code>name</code> is specified, it will be used as the …\n"],["tryload","Bauxite::Action","Bauxite/Action.html#method-i-tryload","(file, *vars)","<p>Load the specified file into an isolated variable context and execute the\nactions specified. If the file …\n"],["wait","Bauxite::Action","Bauxite/Action.html#method-i-wait","(seconds)","<p>Wait for the specified number of <code>seconds</code>.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">wait</span> <span class=\"ruby-value\">5</span>\n<span class=\"ruby-comment\"># =&gt; this would wait for 5 seconds and then ...</span>\n</pre>\n"],["wait","Bauxite::Context","Bauxite/Context.html#method-c-wait","()","<p>Prompts the user to press ENTER before resuming execution.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">wait</span>\n<span class=\"ruby-comment\"># =&gt; echoes &quot;Press ...</span>\n</pre>\n"],["with_timeout","Bauxite::Context","Bauxite/Context.html#method-i-with_timeout","(*error_types)","<p>Executes the given block retrying for at most <code>${__TIMEOUT__}</code>\nseconds. Note that this method does not …\n"],["with_vars","Bauxite::Context","Bauxite/Context.html#method-i-with_vars","(vars)","<p>Temporarily alter the value of context variables.\n<p>This method alters the value of the variables specified …\n"],["write","Bauxite::Action","Bauxite/Action.html#method-i-write","(selector, text)","<p>Sets the value of the selected element to <code>text</code>.\n<p><code>text</code> is subject to variable expansion (see Context#expand …\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["bauxite","action","actionmodule","application","context","errors","assertionerror","filenotfounderror","loggers","compositelogger","echologger","filelogger","nulllogger","terminallogger","xtermlogger","selector","selectormodule","_block()","_cmd_color()","_fmt()","_fmt()","_restore_cursor()","_restore_cursor()","_save_cursor()","_save_cursor()","_screen_width()","_screen_width()","action_args()","actions()","alias_action()","args()","assert()","assertv()","attr()","break_action()","click()","debug()","debug()","debug_prompt()","debug_prompt()","debug_prompt()","default()","echo()","exec()","exec_action()","execute()","expand()","find()","find()","frame()","get_value()","handle_errors()","js()","load()","load_logger()","log()","log()","log()","log_cmd()","log_cmd()","log_cmd()","log_cmd()","log_cmd()","loggers()","max_action_name_size()","new()","new()","new()","new()","new()","new()","new()","open()","params()","parse_args()","parse_file()","progress()","progress()","progress()","replace()","reset()","reset_driver()","return_action()","ruby()","selectors()","selenium_find()","set()","source()","start()","stop()","store()","test()","tryload()","wait()","wait()","with_timeout()","with_vars()","write()"],"longSearchIndex":["bauxite","bauxite::action","bauxite::actionmodule","bauxite::application","bauxite::context","bauxite::errors","bauxite::errors::assertionerror","bauxite::errors::filenotfounderror","bauxite::loggers","bauxite::loggers::compositelogger","bauxite::loggers::echologger","bauxite::loggers::filelogger","bauxite::loggers::nulllogger","bauxite::loggers::terminallogger","bauxite::loggers::xtermlogger","bauxite::selector","bauxite::selectormodule","bauxite::loggers::terminallogger#_block()","bauxite::loggers::terminallogger#_cmd_color()","bauxite::loggers::terminallogger#_fmt()","bauxite::loggers::xtermlogger#_fmt()","bauxite::loggers::terminallogger#_restore_cursor()","bauxite::loggers::xtermlogger#_restore_cursor()","bauxite::loggers::terminallogger#_save_cursor()","bauxite::loggers::xtermlogger#_save_cursor()","bauxite::loggers::terminallogger#_screen_width()","bauxite::loggers::xtermlogger#_screen_width()","bauxite::context::action_args()","bauxite::context::actions()","bauxite::action#alias_action()","bauxite::actionmodule#args()","bauxite::action#assert()","bauxite::action#assertv()","bauxite::selector#attr()","bauxite::action#break_action()","bauxite::action#click()","bauxite::action#debug()","bauxite::context#debug()","bauxite::loggers::compositelogger#debug_prompt()","bauxite::loggers::nulllogger#debug_prompt()","bauxite::loggers::terminallogger#debug_prompt()","bauxite::selector#default()","bauxite::action#echo()","bauxite::action#exec()","bauxite::context#exec_action()","bauxite::actionmodule#execute()","bauxite::context#expand()","bauxite::context#find()","bauxite::selectormodule#find()","bauxite::selector#frame()","bauxite::context#get_value()","bauxite::context#handle_errors()","bauxite::action#js()","bauxite::action#load()","bauxite::context::load_logger()","bauxite::loggers::compositelogger#log()","bauxite::loggers::nulllogger#log()","bauxite::loggers::terminallogger#log()","bauxite::loggers::compositelogger#log_cmd()","bauxite::loggers::echologger#log_cmd()","bauxite::loggers::filelogger#log_cmd()","bauxite::loggers::nulllogger#log_cmd()","bauxite::loggers::terminallogger#log_cmd()","bauxite::context::loggers()","bauxite::context::max_action_name_size()","bauxite::actionmodule::new()","bauxite::context::new()","bauxite::loggers::compositelogger::new()","bauxite::loggers::filelogger::new()","bauxite::loggers::nulllogger::new()","bauxite::loggers::terminallogger::new()","bauxite::selectormodule::new()","bauxite::action#open()","bauxite::action#params()","bauxite::context::parse_args()","bauxite::context#parse_file()","bauxite::loggers::compositelogger#progress()","bauxite::loggers::nulllogger#progress()","bauxite::loggers::terminallogger#progress()","bauxite::action#replace()","bauxite::action#reset()","bauxite::context#reset_driver()","bauxite::action#return_action()","bauxite::action#ruby()","bauxite::context::selectors()","bauxite::selectormodule#selenium_find()","bauxite::action#set()","bauxite::action#source()","bauxite::context#start()","bauxite::context#stop()","bauxite::action#store()","bauxite::action#test()","bauxite::action#tryload()","bauxite::action#wait()","bauxite::context::wait()","bauxite::context#with_timeout()","bauxite::context#with_vars()","bauxite::action#write()"],"info":[["Bauxite","","Bauxite.html","",""],["Bauxite::Action","","Bauxite/Action.html","","<p>Test action class.\n<p>Test actions are basic test operations that can be combined to create a\ntest case. …\n"],["Bauxite::ActionModule","","Bauxite/ActionModule.html","","<p>Action common state and behavior.\n"],["Bauxite::Application","","Bauxite/Application.html","","<p><code>bauxite</code> command-line program.\n<p>This program executes Bauxite tests and outputs the execution progress and\n…\n"],["Bauxite::Context","","Bauxite/Context.html","","<p>The Main test context. This class includes state and helper functions used\nby clients execute tests and …\n"],["Bauxite::Errors","","Bauxite/Errors.html","","<p>Errors Module\n"],["Bauxite::Errors::AssertionError","","Bauxite/Errors/AssertionError.html","","<p>Error raised when an assertion fails.\n"],["Bauxite::Errors::FileNotFoundError","","Bauxite/Errors/FileNotFoundError.html","","<p>Error raised when an invalid file tried to be loaded.\n"],["Bauxite::Loggers","","Bauxite/Loggers.html","","<p>Test loggers module\n<p>The default Logger class and all custom loggers must be included in this\nmodule.\n"],["Bauxite::Loggers::CompositeLogger","","Bauxite/Loggers/CompositeLogger.html","","<p>Composite logger.\n<p>This composite logger forwards logging calls to each of its children.\n<p>Set the <code>:loggers</code> …\n"],["Bauxite::Loggers::EchoLogger","","Bauxite/Loggers/EchoLogger.html","","<p>Echo logger.\n<p>This logger outputs the raw action text for every action executed.\n<p>Note that this logger does …\n"],["Bauxite::Loggers::FileLogger","","Bauxite/Loggers/FileLogger.html","","<p>File logger.\n<p>This logger outputs the raw action text for every action executed to the\nfile specified in …\n"],["Bauxite::Loggers::NullLogger","","Bauxite/Loggers/NullLogger.html","","<p>Test logger class.\n<p>Test loggers handle test output format.\n<p>The default logger does not provide any output …\n"],["Bauxite::Loggers::TerminalLogger","","Bauxite/Loggers/TerminalLogger.html","","<p>Terminal logger.\n<p>This logger outputs text using basic text formatting for a terminal window.\n"],["Bauxite::Loggers::XtermLogger","","Bauxite/Loggers/XtermLogger.html","","<p>XTerm logger.\n<p>This logger outputs colorized lines using xterm (VT100/2) escape sequences.\n"],["Bauxite::Selector","","Bauxite/Selector.html","","<p>Selector class.\n<p>Selectors represent different strategies for finding elements. Selenium\nprovides a list …\n"],["Bauxite::SelectorModule","","Bauxite/SelectorModule.html","","<p>Selector common state and behavior.\n"],["_block","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_block","(color, text, size)","<p>Prints <code>text</code> centered inside a square-bracketed block.\n"],["_cmd_color","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_cmd_color","(cmd)","<p>Get the color of <code>cmd</code>.\n"],["_fmt","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_fmt","(color, text, size = 0)","<p>Centers <code>text</code> to a fixed size with.\n"],["_fmt","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_fmt","(color, text, size = 0)",""],["_restore_cursor","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_restore_cursor","()","<p>Restores the cursor to the previously saved cursor position.\n"],["_restore_cursor","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_restore_cursor","()",""],["_save_cursor","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_save_cursor","()","<p>Save the current cursor position,\n"],["_save_cursor","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_save_cursor","()",""],["_screen_width","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-_screen_width","()","<p>Returns the terminal screen width.\n"],["_screen_width","Bauxite::Loggers::XtermLogger","Bauxite/Loggers/XtermLogger.html#method-i-_screen_width","()",""],["action_args","Bauxite::Context","Bauxite/Context.html#method-c-action_args","(action)","<p>Returns an array with the names of the arguments of the specified action.\n<p>For example:\n\n<pre>Context::action_args ...</pre>\n"],["actions","Bauxite::Context","Bauxite/Context.html#method-c-actions","()","<p>Returns an array with the names of every action available.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">actions</span>\n<span class=\"ruby-comment\"># =&gt; [ &quot;assert&quot;, ...</span>\n</pre>\n"],["alias_action","Bauxite::Action","Bauxite/Action.html#method-i-alias_action","(name, action, *args)","<p>Aliases <code>name</code> to <code>action</code> with additional arguments.\n<p>In <code>args</code> the variables <code>${1}</code>..<code>${n}</code>\nwill be expanded to …\n"],["args","Bauxite::ActionModule","Bauxite/ActionModule.html#method-i-args","(quote = false)","<p>Returns the action arguments after applying variable expansion.\n<p>See Context#expand.\n<p>If <code>quote</code> is <code>true</code>, the …\n"],["assert","Bauxite::Action","Bauxite/Action.html#method-i-assert","(selector, text)","<p>Asserts that the value of the selected element matches <code>text</code>.\n<p><code>text</code> is a regular expression. <code>text</code> can be …\n"],["assertv","Bauxite::Action","Bauxite/Action.html#method-i-assertv","(expected, actual)","<p>Asserts that the <code>actual</code> text matches the <code>expected</code>\ntext.\n<p><code>expected</code> can be a regular expression. See #assert …\n"],["attr","Bauxite::Selector","Bauxite/Selector.html#method-i-attr","(arg, &block)","<p>Select an element by attribute value.\n<p>The attribute selector syntax is:\n\n<pre>attr=name:value</pre>\n"],["break_action","Bauxite::Action","Bauxite/Action.html#method-i-break_action","()","<p>Prompts the user to press ENTER before resuming execution.\n<p>Note that this method provides an action named …\n"],["click","Bauxite::Action","Bauxite/Action.html#method-i-click","(selector)","<p>Triggers the <code>click</code> event on the selected element.\n<p>For example:\n\n<pre># assuming &lt;button type=&quot;button&quot; id=&quot;btn&quot;&gt;click ...</pre>\n"],["debug","Bauxite::Action","Bauxite/Action.html#method-i-debug","()","<p>Breaks into the debug console.\n<p>In the debug console you can type action strings and test their result. …\n"],["debug","Bauxite::Context","Bauxite/Context.html#method-i-debug","()","<p>Breaks into the debug console.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">ctx</span>.<span class=\"ruby-identifier\">debug</span>\n<span class=\"ruby-comment\"># =&gt; this breaks into the debug console</span>\n</pre>\n"],["debug_prompt","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-debug_prompt","()","<p>Returns a colorized debug prompt.\n<p>This implementation returns the debug_prompt of the first logger.\n"],["debug_prompt","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-debug_prompt","()","<p>Returns the prompt shown by the debug console (see Context#debug).\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">log</span>.<span class=\"ruby-identifier\">debug_prompt</span>\n<span class=\"ruby-comment\"># =&gt; returns ...</span>\n</pre>\n"],["debug_prompt","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-debug_prompt","()","<p>Returns a colorized debug prompt.\n"],["default","Bauxite::Selector","Bauxite/Selector.html#method-i-default","(arg, &block)","<p>Select an element by id suffix.\n<p>This is the default selector. Any selector strings that do not contain …\n"],["echo","Bauxite::Action","Bauxite/Action.html#method-i-echo","(text)","<p>Prints the value of the specified <code>text</code>.\n<p><code>text</code> is subject to variable expansion (see Context#expand).\n<p>For …\n"],["exec","Bauxite::Action","Bauxite/Action.html#method-i-exec","(*command)","<p>Executes <code>command</code>, optionally storing the results in a\nvariable.\n<p>If the first argument of <code>command</code> is <code>name=...</code> …\n"],["exec_action","Bauxite::Context","Bauxite/Context.html#method-i-exec_action","(action, log = true)","<p>Executes the specified action handling errors, logging and debug history.\nActions can be obtained by …\n"],["execute","Bauxite::ActionModule","Bauxite/ActionModule.html#method-i-execute","()","<p>Executes the action evaluating the arguments in the current context.\n<p>Note that #execute calls #args to …\n"],["expand","Bauxite::Context","Bauxite/Context.html#method-i-expand","(s)","<p>Recursively replaces occurencies of variable expansions in <code>s</code>\nwith the corresponding variable value.\n<p>The …\n"],["find","Bauxite::Context","Bauxite/Context.html#method-i-find","(selector)","<p>Finds an element by <code>selector</code>.\n<p>The element found is yielded to the given <code>block</code> (if any) and\nreturned.\n<p>Note …\n"],["find","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-i-find","(selector, &block)","<p>Searches for elements using the specified selector string.\n<p>For more information see Context#find.\n<p>Selectors …\n"],["frame","Bauxite::Selector","Bauxite/Selector.html#method-i-frame","(arg, &block)","<p>Change the selector scope to the given frame and finds an element in that\nframe.\n<p>This is a composite selector. …\n"],["get_value","Bauxite::Context","Bauxite/Context.html#method-i-get_value","(element)","<p>Returns the value of the specified <code>element</code>.\n<p>This method takes into account the type of element and selectively …\n"],["handle_errors","Bauxite::Context","Bauxite/Context.html#method-i-handle_errors","(break_into_debug = false, exit_on_error = true)","<p>Executes the <code>block</code> inside a rescue block applying standard\ncriteria of error handling.\n<p>The default behavior …\n"],["js","Bauxite::Action","Bauxite/Action.html#method-i-js","(script, name = nil)","<p>Executes the specified Javascript <code>script</code>, optionally storing\nthe results the variable named <code>name</code>.\n<p>Note …\n"],["load","Bauxite::Action","Bauxite/Action.html#method-i-load","(file, *vars)","<p>Load the specified file into an isolated variable context and execute the\nactions specified. If the file …\n"],["load_logger","Bauxite::Context","Bauxite/Context.html#method-c-load_logger","(name, options)","<p>Constructs a Logger instance using <code>name</code> as a hint for the\nlogger type.\n"],["log","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-log","(s, type = :info)","<p>Prints the specified string.\n<p>See Bauxite::Loggers::NullLogger#print\n"],["log","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-log","(s, type = :info)","<p>Logs the specified string.\n<p><code>type</code>, if specified, should be one of <code>:error</code>,\n<code>:warning</code>, <code>:info</code> (default), <code>:debug</code> …\n"],["log","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-log","(s, type = :info)","<p>Prints the specified string.\n<p>See Bauxite::Loggers::NullLogger#print\n"],["log_cmd","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-log_cmd","(action, &block)","<p>Pretty prints action information and status.\n<p>This implementation only yileds in the first logger.\n<p>Additional …\n"],["log_cmd","Bauxite::Loggers::EchoLogger","Bauxite/Loggers/EchoLogger.html#method-i-log_cmd","(action)","<p>Echoes the raw action text.\n"],["log_cmd","Bauxite::Loggers::FileLogger","Bauxite/Loggers/FileLogger.html#method-i-log_cmd","(action)","<p>Echoes the raw action text.\n"],["log_cmd","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-log_cmd","(action)","<p>Executes the given block in a logging context.\n<p>This default implementation does not provide any logging …\n"],["log_cmd","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-log_cmd","(action)","<p>Pretty prints action information and status.\n"],["loggers","Bauxite::Context","Bauxite/Context.html#method-c-loggers","()","<p>Returns an array with the names of every logger available.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">loggers</span>\n<span class=\"ruby-comment\"># =&gt; [ &quot;null&quot;, ...</span>\n</pre>\n"],["max_action_name_size","Bauxite::Context","Bauxite/Context.html#method-c-max_action_name_size","()","<p>Returns the maximum size in characters of an action name.\n<p>This method is useful to pretty print lists …\n"],["new","Bauxite::ActionModule","Bauxite/ActionModule.html#method-c-new","(ctx, cmd, args, text, file, line)","<p>Constructs a new test action instance.\n"],["new","Bauxite::Context","Bauxite/Context.html#method-c-new","(options)","<p>Constructs a new test context instance.\n<p><code>options</code> is a hash with the following values:\n<p>:driver &mdash; selenium driver …\n"],["new","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-c-new","(options)","<p>Constructs a new composite logger instance.\n"],["new","Bauxite::Loggers::FileLogger","Bauxite/Loggers/FileLogger.html#method-c-new","(options)","<p>Constructs a new echo logger instance.\n"],["new","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-c-new","(options)","<p>Constructs a new null logger instance.\n"],["new","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-c-new","(options)","<p>Constructs a new Terminal logger instance.\n"],["new","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-c-new","(ctx)","<p>Constructs a new test selector instance.\n"],["open","Bauxite::Action","Bauxite/Action.html#method-i-open","(url)","<p>Opens the specified <code>url</code> in the browser.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">open</span> <span class=\"ruby-string\">&quot;http://www.ruby-lang.org&quot;</span>\n<span class=\"ruby-comment\"># =&gt; this would open ...</span>\n</pre>\n"],["params","Bauxite::Action","Bauxite/Action.html#method-i-params","(*vars)","<p>Asserts that the variables named <code>vars</code> are defined and not\nempty.\n<p>For example:\n\n<pre>params host db_name username ...</pre>\n"],["parse_args","Bauxite::Context","Bauxite/Context.html#method-c-parse_args","(line)","<p>Parses a line of action text into an array. The input <code>line</code>\nshould be a space-separated list of values, …\n"],["parse_file","Bauxite::Context","Bauxite/Context.html#method-i-parse_file","(file)","<p>Parses the specified text into a test action array.\n<p>See #parse_action for more details.\n<p>For example:\n"],["progress","Bauxite::Loggers::CompositeLogger","Bauxite/Loggers/CompositeLogger.html#method-i-progress","(value)","<p>Updates action progress.\n"],["progress","Bauxite::Loggers::NullLogger","Bauxite/Loggers/NullLogger.html#method-i-progress","(value)","<p>Updates the progress of the current action.\n"],["progress","Bauxite::Loggers::TerminalLogger","Bauxite/Loggers/TerminalLogger.html#method-i-progress","(value)","<p>Updates action progress.\n"],["replace","Bauxite::Action","Bauxite/Action.html#method-i-replace","(text, pattern, replacement, name)","<p>Replaces the occurrences of <code>pattern</code> in <code>text</code> with\n<code>replacement</code> and assigns the result to the variable named …\n"],["reset","Bauxite::Action","Bauxite/Action.html#method-i-reset","()","<p>Resets the test engine by closing and reopening the browser. As a side\neffect of resetting the test engine, …\n"],["reset_driver","Bauxite::Context","Bauxite/Context.html#method-i-reset_driver","()","<p>Stops the test engine and starts a new engine with the same provider.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">ctx</span>.<span class=\"ruby-identifier\">reset_driver</span>\n=<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-operator\">...</span>\n</pre>\n"],["return_action","Bauxite::Action","Bauxite/Action.html#method-i-return_action","(*vars)","<p>Returns the specified variables to the parent scope (if any).\n<p>If <code>vars</code> is <code>*</code> every variable defined in the …\n"],["ruby","Bauxite::Action","Bauxite/Action.html#method-i-ruby","(file, *vars)","<p>Load the specified ruby file into an isolated variable context and execute\nthe ruby code.\n<p><code>file</code> can be …\n"],["selectors","Bauxite::Context","Bauxite/Context.html#method-c-selectors","(include_standard_selectors = true)","<p>Returns an array with the names of every selector available.\n<p>If <code>include_standard_selectors</code> is <code>true</code> (default …\n"],["selenium_find","Bauxite::SelectorModule","Bauxite/SelectorModule.html#method-i-selenium_find","(type, selector)","<p>Searches for elements using standard Selenium selectors.\n<p>Selectors calling this method should forward …\n"],["set","Bauxite::Action","Bauxite/Action.html#method-i-set","(name, value)","<p>Sets the variable named <code>name</code> to the <code>value</code>\nspecified.\n<p>Both <code>name</code> and <code>value</code> are subject to variable\nexpansion …\n"],["source","Bauxite::Action","Bauxite/Action.html#method-i-source","(text)","<p>Asserts that the page source matches <code>text</code>.\n<p><code>text</code> can be a regular expression. See #assert for more\ndetails. …\n"],["start","Bauxite::Context","Bauxite/Context.html#method-i-start","(actions = [])","<p>Starts the test engine and executes the actions specified. If no action was\nspecified, returns without …\n"],["stop","Bauxite::Context","Bauxite/Context.html#method-i-stop","()","<p>Stops the test engine.\n<p>Calling this method at the end of the test is mandatory if #start was\ncalled without …\n"],["store","Bauxite::Action","Bauxite/Action.html#method-i-store","(selector, name)","<p>Sets the variable named <code>name</code> to the value of the selected\nelement.\n<p><code>name</code> is subject to variable expansion …\n"],["test","Bauxite::Action","Bauxite/Action.html#method-i-test","(file, name = nil)","<p>Load <code>file</code> using the #load action into a new test context.\n<p>If <code>name</code> is specified, it will be used as the …\n"],["tryload","Bauxite::Action","Bauxite/Action.html#method-i-tryload","(file, *vars)","<p>Load the specified file into an isolated variable context and execute the\nactions specified. If the file …\n"],["wait","Bauxite::Action","Bauxite/Action.html#method-i-wait","(seconds)","<p>Wait for the specified number of <code>seconds</code>.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-identifier\">wait</span> <span class=\"ruby-value\">5</span>\n<span class=\"ruby-comment\"># =&gt; this would wait for 5 seconds and then ...</span>\n</pre>\n"],["wait","Bauxite::Context","Bauxite/Context.html#method-c-wait","()","<p>Prompts the user to press ENTER before resuming execution.\n<p>For example:\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Context</span><span class=\"ruby-operator\">::</span><span class=\"ruby-identifier\">wait</span>\n<span class=\"ruby-comment\"># =&gt; echoes &quot;Press ...</span>\n</pre>\n"],["with_timeout","Bauxite::Context","Bauxite/Context.html#method-i-with_timeout","(*error_types)","<p>Executes the given block retrying for at most <code>${__TIMEOUT__}</code>\nseconds. Note that this method does not …\n"],["with_vars","Bauxite::Context","Bauxite/Context.html#method-i-with_vars","(vars)","<p>Temporarily alter the value of context variables.\n<p>This method alters the value of the variables specified …\n"],["write","Bauxite::Action","Bauxite/Action.html#method-i-write","(selector, text)","<p>Sets the value of the selected element to <code>text</code>.\n<p><code>text</code> is subject to variable expansion (see Context#expand …\n"]]}}
@@ -38,6 +38,15 @@
38
38
  <li class="module">
39
39
  <a href="Bauxite/ActionModule.html">Bauxite::ActionModule</a>
40
40
  </li>
41
+ <li class="class">
42
+ <a href="Bauxite/Application.html">Bauxite::Application</a>
43
+
44
+ <ul>
45
+ <li><a href="Bauxite/Application.html#label-Synopsis">Synopsis</a>
46
+ <li><a href="Bauxite/Application.html#label-Options">Options</a>
47
+ <li><a href="Bauxite/Application.html#label-Exit+Status">Exit Status</a>
48
+ </ul>
49
+ </li>
41
50
  <li class="class">
42
51
  <a href="Bauxite/Context.html">Bauxite::Context</a>
43
52
 
@@ -33,7 +33,11 @@ class Bauxite::Action
33
33
  # # => this breaks into the debug console
34
34
  # :category: Action Methods
35
35
  def debug
36
- lambda { _debug_process }
36
+ lambda do
37
+ @ctx.with_vars({ '__DEBUG__' => true }) do
38
+ _debug_process
39
+ end
40
+ end
37
41
  end
38
42
 
39
43
  private
@@ -44,7 +48,8 @@ private
44
48
  Readline.completion_proc = lambda { |str| _debug_auto_complete(str) }
45
49
 
46
50
  while line = _debug_get_line
47
- break if line.strip == 'exit'
51
+ next if not line or line == ''
52
+ break if line == 'exit'
48
53
  @ctx.handle_errors(false, false) do
49
54
  @ctx.exec_action({ :text => line, :file => '<debug>', :line => @@debug_line }, true)
50
55
  end
@@ -58,7 +63,7 @@ private
58
63
  if line =~ /^\s*$/ or Readline::HISTORY.to_a[-2] == line
59
64
  Readline::HISTORY.pop
60
65
  end
61
- line
66
+ line.strip
62
67
  end
63
68
 
64
69
  def _debug_auto_complete(str)