doc/Bauxite/Context.html in bauxite-0.6.10 vs doc/Bauxite/Context.html in bauxite-0.6.11
- old
+ new
@@ -839,11 +839,11 @@
<div class="method-source-code" id="load_logger-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 426</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 428</span>
<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>)
<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>
<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>)
<span class="ruby-keyword">end</span>
@@ -887,11 +887,11 @@
<div class="method-source-code" id="parse_action_default-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 454</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 456</span>
<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>)
<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>)
<span class="ruby-keyword">begin</span>
<span class="ruby-identifier">args_text</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">strip</span> <span class="ruby-operator">:</span> <span class="ruby-string">''</span>
<span class="ruby-identifier">args</span> = []
@@ -955,11 +955,11 @@
<div class="method-source-code" id="wait-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 419</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 421</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">wait</span>
<span class="ruby-constant">Readline</span>.<span class="ruby-identifier">readline</span>(<span class="ruby-string">"Press ENTER to continue\n"</span>)
<span class="ruby-keyword">end</span></pre>
</div>
@@ -997,11 +997,11 @@
<div class="method-source-code" id="add_alias-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 448</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 450</span>
<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>)
<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> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1088,11 +1088,11 @@
<div class="method-source-code" id="exec_action_object-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 534</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 536</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_action_object</span>(<span class="ruby-identifier">action</span>)
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">execute</span>
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1202,10 +1202,12 @@
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">ret</span> = <span class="ruby-identifier">exec_action_object</span>(<span class="ruby-identifier">action</span>)
<span class="ruby-keyword">end</span>
<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>
+<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>
+ <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>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
@@ -1239,11 +1241,11 @@
<div class="method-source-code" id="get_action-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 494</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 496</span>
<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>)
<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>])
<span class="ruby-identifier">action</span> = <span class="ruby-identifier">alias_action</span>[<span class="ruby-value">:action</span>]
<span class="ruby-identifier">args</span> = <span class="ruby-identifier">alias_action</span>[<span class="ruby-value">:args</span>].<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</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">gsub</span>(<span class="ruby-regexp">/\$\{(\d+)(\*q?)?\}/</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
@@ -1307,11 +1309,11 @@
<div class="method-source-code" id="output_path-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 579</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 581</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_path</span>(<span class="ruby-identifier">path</span>)
<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>
<span class="ruby-identifier">output</span> = <span class="ruby-ivar">@variables</span>[<span class="ruby-string">'__OUTPUT__'</span>]
<span class="ruby-keyword">if</span> <span class="ruby-identifier">output</span>
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span> <span class="ruby-identifier">output</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">output</span>
@@ -1358,11 +1360,11 @@
<div class="method-source-code" id="print_error-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 549</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 551</span>
<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>)
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@logger</span>
<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>
<span class="ruby-keyword">else</span>
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
@@ -1418,11 +1420,11 @@
<div class="method-source-code" id="with_driver_timeout-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 404</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 406</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">with_driver_timeout</span>(<span class="ruby-identifier">timeout</span>)
<span class="ruby-identifier">current</span> = <span class="ruby-ivar">@driver_timeout</span>
<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>
<span class="ruby-keyword">yield</span>
<span class="ruby-keyword">ensure</span>
@@ -1467,11 +1469,11 @@
<div class="method-source-code" id="with_timeout-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 376</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 378</span>
<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>)
<span class="ruby-identifier">stime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">new</span>
<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>]
<span class="ruby-keyword">yield</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-operator">*</span><span class="ruby-identifier">error_types</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
@@ -1548,11 +1550,11 @@
<div class="method-source-code" id="action_args-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 610</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 612</span>
<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>)
<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>
<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> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1588,11 +1590,11 @@
<div class="method-source-code" id="actions-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 600</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 602</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">actions</span>
<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>) }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1627,11 +1629,11 @@
<div class="method-source-code" id="loggers-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 639</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 641</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">loggers</span>
<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>) }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1669,11 +1671,11 @@
<div class="method-source-code" id="max_action_name_size-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 663</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 665</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">max_action_name_size</span>
<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> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1708,11 +1710,11 @@
<div class="method-source-code" id="parsers-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 649</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 651</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">parsers</span>
(<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>))
.<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> }
<span class="ruby-keyword">end</span></pre>
</div>
@@ -1752,11 +1754,11 @@
<div class="method-source-code" id="selectors-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 625</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 627</span>
<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>)
<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>) }
<span class="ruby-keyword">if</span> <span class="ruby-identifier">include_standard_selectors</span>
<span class="ruby-identifier">ret</span> <span class="ruby-operator">+=</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">SearchContext</span><span class="ruby-operator">::</span><span class="ruby-constant">FINDERS</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
<span class="ruby-keyword">end</span>
@@ -1834,11 +1836,11 @@
<div class="method-source-code" id="expand-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 684</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 686</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">expand</span>(<span class="ruby-identifier">s</span>)
<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>
<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>)
<span class="ruby-keyword">end</span>
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">expand</span>(<span class="ruby-identifier">result</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">result</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">s</span>
@@ -1887,10 +1889,10 @@
<div class="method-source-code" id="with_vars-source">
- <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 707</span>
+ <pre><span class="ruby-comment"># File lib/bauxite/core/context.rb, line 709</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">with_vars</span>(<span class="ruby-identifier">vars</span>)
<span class="ruby-identifier">current</span> = <span class="ruby-ivar">@variables</span>
<span class="ruby-ivar">@variables</span> = <span class="ruby-ivar">@variables</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">vars</span>)
<span class="ruby-identifier">ret_vars</span> = <span class="ruby-keyword">nil</span>