bauxite 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/Bauxite/Action.html +68 -6
- data/doc/Bauxite/Context.html +20 -18
- data/doc/created.rid +55 -54
- data/doc/js/jquery.js +18 -4
- data/doc/js/search_index.js +1 -1
- data/doc/table_of_contents.html +41 -36
- data/lib/bauxite/actions/assertm.rb +47 -0
- data/lib/bauxite/actions/test.rb +9 -4
- data/lib/bauxite/core/context.rb +2 -0
- data/lib/bauxite.rb +1 -1
- data/test/alert/page.html +5 -0
- data/test/alert.bxt +3 -0
- data/test/test/test4.bxt +1 -0
- data/test/test/test5.bxt +1 -0
- data/test/test.bxt.manual +2 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 413f15eac4a00d31aec202aef4ae0fdd0e5ff830
|
4
|
+
data.tar.gz: 5cad94b5cedc1fdfd1126691d1ed6aecd9fd2df8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298193bfea45a604a1c60d2e73873e833d6cba0246b81bf110f055b8c6be0b55d75254744a0b2f89529da9e4c0b0e8d6ba4c92bb727fa8b121aebe0c2bd23a84
|
7
|
+
data.tar.gz: 5d2b5b96366ba582972475a07a8cb4bf0bf6c3837600949bfa1ed91ab5d61a49f335fa201e578eae7b43e6e8ad70041aef01d29a6899cd5f0a0ef39808b253f8
|
data/doc/Bauxite/Action.html
CHANGED
@@ -101,6 +101,8 @@
|
|
101
101
|
|
102
102
|
<li ><a href="#method-i-asserth">#asserth</a>
|
103
103
|
|
104
|
+
<li ><a href="#method-i-assertm">#assertm</a>
|
105
|
+
|
104
106
|
<li ><a href="#method-i-assertv">#assertv</a>
|
105
107
|
|
106
108
|
<li ><a href="#method-i-assertw">#assertw</a>
|
@@ -494,6 +496,60 @@ every expression specified.</p>
|
|
494
496
|
|
495
497
|
|
496
498
|
|
499
|
+
</div>
|
500
|
+
|
501
|
+
|
502
|
+
<div id="method-i-assertm" class="method-detail ">
|
503
|
+
|
504
|
+
<div class="method-heading">
|
505
|
+
<span class="method-name">assertm</span><span
|
506
|
+
class="method-args">(text, action = 'accept')</span>
|
507
|
+
|
508
|
+
<span class="method-click-advice">click to toggle source</span>
|
509
|
+
|
510
|
+
</div>
|
511
|
+
|
512
|
+
|
513
|
+
<div class="method-description">
|
514
|
+
|
515
|
+
<p>Asserts that a native modal popup is present (e.g. alert, confirm, prompt,
|
516
|
+
etc.) and that its text matches the specified <code>text</code>.</p>
|
517
|
+
|
518
|
+
<p><code>text</code> can be a regular expression. See <a
|
519
|
+
href="Action.html#method-i-assert">assert</a> for more details.</p>
|
520
|
+
|
521
|
+
<p>The second <code>action</code> parameter specifies the action to be
|
522
|
+
performed on the native popup. The default action is to <code>accept</code>
|
523
|
+
the popup. Alternatively, the action specified could be to
|
524
|
+
<code>dismiss</code> the popup.</p>
|
525
|
+
|
526
|
+
<p>For example:</p>
|
527
|
+
|
528
|
+
<pre class="ruby"><span class="ruby-comment"># assuming the page opened an alert popup with the "hello world!"</span>
|
529
|
+
<span class="ruby-comment"># text</span>
|
530
|
+
<span class="ruby-identifier">assertm</span> <span class="ruby-string">"hello world!"</span>
|
531
|
+
<span class="ruby-comment"># => this assertion would pass</span>
|
532
|
+
</pre>
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
<div class="method-source-code" id="assertm-source">
|
538
|
+
<pre><span class="ruby-comment"># File lib/bauxite/actions/assertm.rb, line 40</span>
|
539
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">assertm</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">action</span> = <span class="ruby-string">'accept'</span>)
|
540
|
+
<span class="ruby-identifier">a</span> = <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">alert</span>
|
541
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">text</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">_pattern</span>(<span class="ruby-identifier">text</span>)
|
542
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span><span class="ruby-operator">::</span><span class="ruby-constant">AssertionError</span>, <span class="ruby-node">"Assertion failed: expected '#{a.text}', got '#{actual}'"</span>
|
543
|
+
<span class="ruby-keyword">end</span>
|
544
|
+
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">action</span>.<span class="ruby-identifier">to_sym</span>)
|
545
|
+
<span class="ruby-keyword">end</span></pre>
|
546
|
+
</div>
|
547
|
+
|
548
|
+
</div>
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
497
553
|
</div>
|
498
554
|
|
499
555
|
|
@@ -1715,7 +1771,7 @@ href="Context.html#method-i-expand">Bauxite::Context#expand</a>).</p>
|
|
1715
1771
|
|
1716
1772
|
<div class="method-heading">
|
1717
1773
|
<span class="method-name">test</span><span
|
1718
|
-
class="method-args">(file, name = nil)</span>
|
1774
|
+
class="method-args">(file, name = nil, *vars)</span>
|
1719
1775
|
|
1720
1776
|
<span class="method-click-advice">click to toggle source</span>
|
1721
1777
|
|
@@ -1729,23 +1785,29 @@ href="Action.html#method-i-load">load</a> action into a new test context.</p>
|
|
1729
1785
|
|
1730
1786
|
<p>If <code>name</code> is specified, it will be used as the test name.</p>
|
1731
1787
|
|
1788
|
+
<p>An optional list of variables can be provided in <code>vars</code>. These
|
1789
|
+
variables will override the value of the context variables for the
|
1790
|
+
execution of the file (See <a
|
1791
|
+
href="Context.html#method-i-with_vars">Bauxite::Context#with_vars</a>).</p>
|
1792
|
+
|
1732
1793
|
<p>If any action in the test context fails, the whole test context fails, and
|
1733
1794
|
the execution continues with the next test context (if any).</p>
|
1734
1795
|
|
1735
1796
|
<p>For example:</p>
|
1736
1797
|
|
1737
|
-
<pre class="ruby"><span class="ruby-identifier">test</span> <span class="ruby-identifier">mytest</span>.<span class="ruby-identifier">bxt</span> <span class="ruby-string">"My Test"</span>
|
1798
|
+
<pre class="ruby"><span class="ruby-identifier">test</span> <span class="ruby-identifier">mytest</span>.<span class="ruby-identifier">bxt</span> <span class="ruby-string">"My Test"</span> <span class="ruby-identifier">my_var</span>=<span class="ruby-value">1</span>
|
1738
1799
|
<span class="ruby-comment"># => this would load mytest.bxt into a new test context</span>
|
1739
|
-
<span class="ruby-comment"># named "My Test"
|
1800
|
+
<span class="ruby-comment"># named "My Test", and within that context ${my_var}</span>
|
1801
|
+
<span class="ruby-comment"># would expand to 1.</span>
|
1740
1802
|
</pre>
|
1741
1803
|
|
1742
1804
|
|
1743
1805
|
|
1744
1806
|
|
1745
1807
|
<div class="method-source-code" id="test-source">
|
1746
|
-
<pre><span class="ruby-comment"># File lib/bauxite/actions/test.rb, line
|
1747
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
|
1748
|
-
<span class="ruby-identifier">delayed</span> = <span class="ruby-identifier">load</span>(<span class="ruby-identifier">file</span>)
|
1808
|
+
<pre><span class="ruby-comment"># File lib/bauxite/actions/test.rb, line 42</span>
|
1809
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">vars</span>)
|
1810
|
+
<span class="ruby-identifier">delayed</span> = <span class="ruby-identifier">load</span>(<span class="ruby-identifier">file</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">vars</span>)
|
1749
1811
|
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">file</span>
|
1750
1812
|
<span class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span>
|
1751
1813
|
<span class="ruby-keyword">begin</span>
|
data/doc/Bauxite/Context.html
CHANGED
@@ -841,7 +841,7 @@ logger type.</p>
|
|
841
841
|
|
842
842
|
|
843
843
|
<div class="method-source-code" id="load_logger-source">
|
844
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
844
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 428</span>
|
845
845
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_logger</span>(<span class="ruby-identifier">loggers</span>, <span class="ruby-identifier">options</span>)
|
846
846
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">loggers</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
|
847
847
|
<span class="ruby-keyword">return</span> <span class="ruby-constant">Loggers</span><span class="ruby-operator">::</span><span class="ruby-constant">CompositeLogger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">loggers</span>)
|
@@ -889,7 +889,7 @@ logger type.</p>
|
|
889
889
|
|
890
890
|
|
891
891
|
<div class="method-source-code" id="parse_action_default-source">
|
892
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
892
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 456</span>
|
893
893
|
<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">'<unknown>'</span>, <span class="ruby-identifier">line</span> = <span class="ruby-value">0</span>)
|
894
894
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">' '</span>, <span class="ruby-value">2</span>)
|
895
895
|
<span class="ruby-keyword">begin</span>
|
@@ -957,7 +957,7 @@ logger type.</p>
|
|
957
957
|
|
958
958
|
|
959
959
|
<div class="method-source-code" id="wait-source">
|
960
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
960
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 421</span>
|
961
961
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">wait</span>
|
962
962
|
<span class="ruby-constant">Readline</span>.<span class="ruby-identifier">readline</span>(<span class="ruby-string">"Press ENTER to continue\n"</span>)
|
963
963
|
<span class="ruby-keyword">end</span></pre>
|
@@ -999,7 +999,7 @@ with the arguments specified in <code>args</code>.</p>
|
|
999
999
|
|
1000
1000
|
|
1001
1001
|
<div class="method-source-code" id="add_alias-source">
|
1002
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1002
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 450</span>
|
1003
1003
|
<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>)
|
1004
1004
|
<span class="ruby-ivar">@aliases</span>[<span class="ruby-identifier">name</span>] = { <span class="ruby-value">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">action</span>, <span class="ruby-value">:args</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span> }
|
1005
1005
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1090,7 +1090,7 @@ ret.call if ret.respond_to? :call</pre>
|
|
1090
1090
|
|
1091
1091
|
|
1092
1092
|
<div class="method-source-code" id="exec_action_object-source">
|
1093
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1093
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 536</span>
|
1094
1094
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_action_object</span>(<span class="ruby-identifier">action</span>)
|
1095
1095
|
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">execute</span>
|
1096
1096
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1204,6 +1204,8 @@ preferred.</p>
|
|
1204
1204
|
<span class="ruby-keyword">end</span>
|
1205
1205
|
|
1206
1206
|
<span class="ruby-identifier">ret</span>.<span class="ruby-identifier">call</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:call</span> <span class="ruby-comment"># delayed actions (after log_cmd)</span>
|
1207
|
+
<span class="ruby-keyword">rescue</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">UnhandledAlertError</span>
|
1208
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">Bauxite</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span><span class="ruby-operator">::</span><span class="ruby-constant">AssertionError</span>, <span class="ruby-string">"Unexpected modal present"</span>
|
1207
1209
|
<span class="ruby-keyword">end</span></pre>
|
1208
1210
|
</div>
|
1209
1211
|
|
@@ -1241,7 +1243,7 @@ preferred.</p>
|
|
1241
1243
|
|
1242
1244
|
|
1243
1245
|
<div class="method-source-code" id="get_action-source">
|
1244
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1246
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 496</span>
|
1245
1247
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">text</span> = <span class="ruby-keyword">nil</span>)
|
1246
1248
|
<span class="ruby-keyword">while</span> (<span class="ruby-identifier">alias_action</span> = <span class="ruby-ivar">@aliases</span>[<span class="ruby-identifier">action</span>])
|
1247
1249
|
<span class="ruby-identifier">action</span> = <span class="ruby-identifier">alias_action</span>[<span class="ruby-value">:action</span>]
|
@@ -1309,7 +1311,7 @@ preferred.</p>
|
|
1309
1311
|
|
1310
1312
|
|
1311
1313
|
<div class="method-source-code" id="output_path-source">
|
1312
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1314
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 581</span>
|
1313
1315
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_path</span>(<span class="ruby-identifier">path</span>)
|
1314
1316
|
<span class="ruby-keyword">unless</span> <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">absolute?</span>
|
1315
1317
|
<span class="ruby-identifier">output</span> = <span class="ruby-ivar">@variables</span>[<span class="ruby-string">'__OUTPUT__'</span>]
|
@@ -1360,7 +1362,7 @@ handling the verbose option.</p>
|
|
1360
1362
|
|
1361
1363
|
|
1362
1364
|
<div class="method-source-code" id="print_error-source">
|
1363
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1365
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 551</span>
|
1364
1366
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">print_error</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">capture</span> = <span class="ruby-keyword">true</span>)
|
1365
1367
|
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@logger</span>
|
1366
1368
|
<span class="ruby-ivar">@logger</span>.<span class="ruby-identifier">log</span> <span class="ruby-node">"#{e.message}\n"</span>, <span class="ruby-value">:error</span>
|
@@ -1420,7 +1422,7 @@ available <a href="Selector.html">Selector</a> strategies).</p>
|
|
1420
1422
|
|
1421
1423
|
|
1422
1424
|
<div class="method-source-code" id="with_driver_timeout-source">
|
1423
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1425
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 406</span>
|
1424
1426
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">with_driver_timeout</span>(<span class="ruby-identifier">timeout</span>)
|
1425
1427
|
<span class="ruby-identifier">current</span> = <span class="ruby-ivar">@driver_timeout</span>
|
1426
1428
|
<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">manage</span>.<span class="ruby-identifier">timeouts</span>.<span class="ruby-identifier">implicit_wait</span> = <span class="ruby-identifier">timeout</span>
|
@@ -1469,7 +1471,7 @@ to execute the block itself.</p>
|
|
1469
1471
|
|
1470
1472
|
|
1471
1473
|
<div class="method-source-code" id="with_timeout-source">
|
1472
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1474
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 378</span>
|
1473
1475
|
<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>)
|
1474
1476
|
<span class="ruby-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
|
1475
1477
|
<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">'__TIMEOUT__'</span>]
|
@@ -1550,7 +1552,7 @@ to execute the block itself.</p>
|
|
1550
1552
|
|
1551
1553
|
|
1552
1554
|
<div class="method-source-code" id="action_args-source">
|
1553
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1555
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 612</span>
|
1554
1556
|
<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>)
|
1555
1557
|
<span class="ruby-identifier">action</span> <span class="ruby-operator">+=</span> <span class="ruby-string">'_action'</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>
|
1556
1558
|
<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> }
|
@@ -1590,7 +1592,7 @@ to execute the block itself.</p>
|
|
1590
1592
|
|
1591
1593
|
|
1592
1594
|
<div class="method-source-code" id="actions-source">
|
1593
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1595
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 602</span>
|
1594
1596
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">actions</span>
|
1595
1597
|
<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">''</span>) }
|
1596
1598
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1629,7 +1631,7 @@ to execute the block itself.</p>
|
|
1629
1631
|
|
1630
1632
|
|
1631
1633
|
<div class="method-source-code" id="loggers-source">
|
1632
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1634
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 641</span>
|
1633
1635
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">loggers</span>
|
1634
1636
|
<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">''</span>) }
|
1635
1637
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1671,7 +1673,7 @@ to execute the block itself.</p>
|
|
1671
1673
|
|
1672
1674
|
|
1673
1675
|
<div class="method-source-code" id="max_action_name_size-source">
|
1674
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1676
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 665</span>
|
1675
1677
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">max_action_name_size</span>
|
1676
1678
|
<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">></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> }
|
1677
1679
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1710,7 +1712,7 @@ to execute the block itself.</p>
|
|
1710
1712
|
|
1711
1713
|
|
1712
1714
|
<div class="method-source-code" id="parsers-source">
|
1713
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1715
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 651</span>
|
1714
1716
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parsers</span>
|
1715
1717
|
(<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>))
|
1716
1718
|
.<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> }
|
@@ -1754,7 +1756,7 @@ custom selectors are returned.</p>
|
|
1754
1756
|
|
1755
1757
|
|
1756
1758
|
<div class="method-source-code" id="selectors-source">
|
1757
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1759
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 627</span>
|
1758
1760
|
<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>)
|
1759
1761
|
<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">''</span>) }
|
1760
1762
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">include_standard_selectors</span>
|
@@ -1836,7 +1838,7 @@ with the corresponding variable value.</p>
|
|
1836
1838
|
|
1837
1839
|
|
1838
1840
|
<div class="method-source-code" id="expand-source">
|
1839
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1841
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 686</span>
|
1840
1842
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">expand</span>(<span class="ruby-identifier">s</span>)
|
1841
1843
|
<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>
|
1842
1844
|
<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>)
|
@@ -1889,7 +1891,7 @@ variables is restored.</p>
|
|
1889
1891
|
|
1890
1892
|
|
1891
1893
|
<div class="method-source-code" id="with_vars-source">
|
1892
|
-
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line
|
1894
|
+
<pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 709</span>
|
1893
1895
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">with_vars</span>(<span class="ruby-identifier">vars</span>)
|
1894
1896
|
<span class="ruby-identifier">current</span> = <span class="ruby-ivar">@variables</span>
|
1895
1897
|
<span class="ruby-ivar">@variables</span> = <span class="ruby-ivar">@variables</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">vars</span>)
|
data/doc/created.rid
CHANGED
@@ -1,54 +1,55 @@
|
|
1
|
-
|
2
|
-
README.md
|
3
|
-
lib/bauxite/
|
4
|
-
lib/bauxite/
|
5
|
-
lib/bauxite/
|
6
|
-
lib/bauxite/
|
7
|
-
lib/bauxite/
|
8
|
-
lib/bauxite/
|
9
|
-
lib/bauxite/
|
10
|
-
lib/bauxite/
|
11
|
-
lib/bauxite/
|
12
|
-
lib/bauxite/
|
13
|
-
lib/bauxite/
|
14
|
-
lib/bauxite/
|
15
|
-
lib/bauxite/
|
16
|
-
lib/bauxite/
|
17
|
-
lib/bauxite/actions/
|
18
|
-
lib/bauxite/actions/
|
19
|
-
lib/bauxite/actions/
|
20
|
-
lib/bauxite/actions/
|
21
|
-
lib/bauxite/actions/set.rb
|
22
|
-
lib/bauxite/actions/
|
23
|
-
lib/bauxite/actions/
|
24
|
-
lib/bauxite/actions/
|
25
|
-
lib/bauxite/actions/
|
26
|
-
lib/bauxite/actions/
|
27
|
-
lib/bauxite/actions/
|
28
|
-
lib/bauxite/actions/
|
29
|
-
lib/bauxite/actions/
|
30
|
-
lib/bauxite/actions/
|
31
|
-
lib/bauxite/actions/
|
32
|
-
lib/bauxite/actions/
|
33
|
-
lib/bauxite/actions/
|
34
|
-
lib/bauxite/
|
35
|
-
lib/bauxite/
|
36
|
-
lib/bauxite/
|
37
|
-
lib/bauxite/
|
38
|
-
lib/bauxite/
|
39
|
-
lib/bauxite/
|
40
|
-
lib/bauxite/
|
41
|
-
lib/bauxite/
|
42
|
-
lib/bauxite/
|
43
|
-
lib/bauxite/
|
44
|
-
lib/bauxite/
|
45
|
-
lib/bauxite/
|
46
|
-
lib/bauxite/
|
47
|
-
lib/bauxite/
|
48
|
-
lib/bauxite/
|
49
|
-
lib/bauxite/
|
50
|
-
lib/bauxite/
|
51
|
-
lib/bauxite/
|
52
|
-
lib/bauxite/
|
53
|
-
lib/bauxite/
|
54
|
-
lib/bauxite/
|
1
|
+
Thu, 01 May 2014 14:00:46 -0300
|
2
|
+
README.md Wed, 26 Mar 2014 13:39:30 -0300
|
3
|
+
lib/bauxite/selectors/smart.rb Wed, 26 Mar 2014 13:39:30 -0300
|
4
|
+
lib/bauxite/selectors/attr.rb Wed, 26 Mar 2014 13:39:30 -0300
|
5
|
+
lib/bauxite/selectors/frame.rb Wed, 26 Mar 2014 13:39:30 -0300
|
6
|
+
lib/bauxite/selectors/sid.rb Wed, 26 Mar 2014 13:39:30 -0300
|
7
|
+
lib/bauxite/selectors/window.rb Wed, 26 Mar 2014 13:39:30 -0300
|
8
|
+
lib/bauxite/parsers/csv.rb Wed, 26 Mar 2014 13:39:30 -0300
|
9
|
+
lib/bauxite/parsers/default.rb Wed, 26 Mar 2014 13:39:30 -0300
|
10
|
+
lib/bauxite/parsers/html.rb Wed, 26 Mar 2014 13:39:30 -0300
|
11
|
+
lib/bauxite/loggers/xterm.rb Wed, 26 Mar 2014 13:39:30 -0300
|
12
|
+
lib/bauxite/loggers/html.rb Wed, 26 Mar 2014 13:39:30 -0300
|
13
|
+
lib/bauxite/loggers/terminal.rb Wed, 26 Mar 2014 13:39:30 -0300
|
14
|
+
lib/bauxite/loggers/echo.rb Wed, 26 Mar 2014 13:39:30 -0300
|
15
|
+
lib/bauxite/loggers/composite.rb Wed, 26 Mar 2014 13:39:30 -0300
|
16
|
+
lib/bauxite/loggers/file.rb Wed, 26 Mar 2014 13:39:30 -0300
|
17
|
+
lib/bauxite/actions/assertv.rb Wed, 26 Mar 2014 13:39:30 -0300
|
18
|
+
lib/bauxite/actions/ruby.rb Wed, 26 Mar 2014 13:39:30 -0300
|
19
|
+
lib/bauxite/actions/load.rb Wed, 26 Mar 2014 13:39:30 -0300
|
20
|
+
lib/bauxite/actions/return.rb Wed, 26 Mar 2014 13:39:30 -0300
|
21
|
+
lib/bauxite/actions/set.rb Wed, 26 Mar 2014 13:39:30 -0300
|
22
|
+
lib/bauxite/actions/alias.rb Wed, 26 Mar 2014 13:39:30 -0300
|
23
|
+
lib/bauxite/actions/write.rb Wed, 26 Mar 2014 13:39:30 -0300
|
24
|
+
lib/bauxite/actions/select.rb Wed, 26 Mar 2014 13:39:30 -0300
|
25
|
+
lib/bauxite/actions/failif.rb Wed, 26 Mar 2014 13:39:30 -0300
|
26
|
+
lib/bauxite/actions/doif.rb Wed, 26 Mar 2014 13:39:30 -0300
|
27
|
+
lib/bauxite/actions/setif.rb Wed, 26 Mar 2014 13:39:30 -0300
|
28
|
+
lib/bauxite/actions/wait.rb Wed, 26 Mar 2014 13:39:30 -0300
|
29
|
+
lib/bauxite/actions/exec.rb Wed, 26 Mar 2014 13:39:30 -0300
|
30
|
+
lib/bauxite/actions/replace.rb Wed, 26 Mar 2014 13:39:30 -0300
|
31
|
+
lib/bauxite/actions/store.rb Wed, 26 Mar 2014 13:39:30 -0300
|
32
|
+
lib/bauxite/actions/debug.rb Wed, 26 Mar 2014 13:39:30 -0300
|
33
|
+
lib/bauxite/actions/asserth.rb Wed, 26 Mar 2014 13:39:30 -0300
|
34
|
+
lib/bauxite/actions/click.rb Wed, 26 Mar 2014 13:39:30 -0300
|
35
|
+
lib/bauxite/actions/js.rb Wed, 26 Mar 2014 13:39:30 -0300
|
36
|
+
lib/bauxite/actions/capture.rb Wed, 26 Mar 2014 13:39:30 -0300
|
37
|
+
lib/bauxite/actions/assertm.rb Thu, 01 May 2014 13:49:14 -0300
|
38
|
+
lib/bauxite/actions/params.rb Wed, 26 Mar 2014 13:39:30 -0300
|
39
|
+
lib/bauxite/actions/assert.rb Wed, 26 Mar 2014 13:39:30 -0300
|
40
|
+
lib/bauxite/actions/open.rb Wed, 26 Mar 2014 13:39:30 -0300
|
41
|
+
lib/bauxite/actions/assertw.rb Wed, 26 Mar 2014 13:39:30 -0300
|
42
|
+
lib/bauxite/actions/echo.rb Wed, 26 Mar 2014 13:39:30 -0300
|
43
|
+
lib/bauxite/actions/break.rb Wed, 26 Mar 2014 13:39:30 -0300
|
44
|
+
lib/bauxite/actions/test.rb Thu, 01 May 2014 13:56:24 -0300
|
45
|
+
lib/bauxite/actions/reset.rb Wed, 26 Mar 2014 13:39:30 -0300
|
46
|
+
lib/bauxite/actions/submit.rb Wed, 26 Mar 2014 13:39:30 -0300
|
47
|
+
lib/bauxite/actions/tryload.rb Wed, 26 Mar 2014 13:39:30 -0300
|
48
|
+
lib/bauxite/actions/source.rb Wed, 26 Mar 2014 13:39:30 -0300
|
49
|
+
lib/bauxite/application.rb Wed, 26 Mar 2014 13:39:30 -0300
|
50
|
+
lib/bauxite/core/logger.rb Wed, 26 Mar 2014 13:39:30 -0300
|
51
|
+
lib/bauxite/core/errors.rb Wed, 26 Mar 2014 13:39:30 -0300
|
52
|
+
lib/bauxite/core/selector.rb Wed, 26 Mar 2014 13:39:30 -0300
|
53
|
+
lib/bauxite/core/action.rb Wed, 26 Mar 2014 13:39:30 -0300
|
54
|
+
lib/bauxite/core/context.rb Thu, 01 May 2014 13:43:36 -0300
|
55
|
+
lib/bauxite/core/parser.rb Wed, 26 Mar 2014 13:39:30 -0300
|