bauxite 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/Rakefile +3 -0
  4. data/doc/Bauxite.html +1 -1
  5. data/doc/Bauxite/Action.html +2 -1
  6. data/doc/Bauxite/ActionModule.html +1 -1
  7. data/doc/Bauxite/Application.html +9 -1
  8. data/doc/Bauxite/Context.html +156 -27
  9. data/doc/Bauxite/Errors.html +1 -1
  10. data/doc/Bauxite/Errors/AssertionError.html +1 -1
  11. data/doc/Bauxite/Errors/FileNotFoundError.html +1 -1
  12. data/doc/Bauxite/Errors/FormatError.html +1 -1
  13. data/doc/Bauxite/Loggers.html +1 -1
  14. data/doc/Bauxite/Loggers/CompositeLogger.html +1 -1
  15. data/doc/Bauxite/Loggers/EchoLogger.html +1 -1
  16. data/doc/Bauxite/Loggers/FileLogger.html +1 -1
  17. data/doc/Bauxite/Loggers/NullLogger.html +1 -1
  18. data/doc/Bauxite/Loggers/TerminalLogger.html +1 -1
  19. data/doc/Bauxite/Loggers/XtermLogger.html +1 -1
  20. data/doc/Bauxite/Parser.html +1 -1
  21. data/doc/Bauxite/ParserModule.html +1 -1
  22. data/doc/Bauxite/Selector.html +52 -52
  23. data/doc/Bauxite/SelectorModule.html +12 -7
  24. data/doc/README_md.html +5 -1
  25. data/doc/created.rid +46 -46
  26. data/doc/index.html +5 -1
  27. data/doc/js/jquery.js +4 -18
  28. data/doc/js/search_index.js +1 -1
  29. data/doc/table_of_contents.html +50 -43
  30. data/lib/bauxite.rb +1 -1
  31. data/lib/bauxite/actions/open.rb +1 -0
  32. data/lib/bauxite/application.rb +9 -0
  33. data/lib/bauxite/core/context.rb +71 -3
  34. data/lib/bauxite/core/selector.rb +8 -3
  35. data/lib/bauxite/selectors/frame.rb +7 -7
  36. data/lib/bauxite/selectors/{default.rb → sid.rb} +2 -2
  37. data/lib/bauxite/selectors/smart.rb +2 -3
  38. data/test/default_selector.bxt.manual +7 -0
  39. data/test/default_selector/page.html +11 -0
  40. data/test/default_selector_var.bxt +1 -0
  41. metadata +10 -4
@@ -94,7 +94,7 @@
94
94
 
95
95
  <footer id="validator-badges" role="contentinfo">
96
96
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
97
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
97
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
98
98
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
99
99
  </footer>
100
100
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -101,7 +101,7 @@
101
101
 
102
102
  <footer id="validator-badges" role="contentinfo">
103
103
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
104
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
104
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
105
105
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
106
106
  </footer>
107
107
 
@@ -97,7 +97,7 @@ module.</p>
97
97
 
98
98
  <footer id="validator-badges" role="contentinfo">
99
99
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
100
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
100
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
101
101
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
102
102
  </footer>
103
103
 
@@ -319,7 +319,7 @@ first logger.</p>
319
319
 
320
320
  <footer id="validator-badges" role="contentinfo">
321
321
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
322
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
322
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
323
323
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
324
324
  </footer>
325
325
 
@@ -159,7 +159,7 @@ action succeeded, failed or was skipped).</p>
159
159
 
160
160
  <footer id="validator-badges" role="contentinfo">
161
161
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
162
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
162
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
163
163
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
164
164
  </footer>
165
165
 
@@ -209,7 +209,7 @@ file specified in the <code>file</code> logger option.</p>
209
209
 
210
210
  <footer id="validator-badges" role="contentinfo">
211
211
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
212
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
212
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
213
213
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
214
214
  </footer>
215
215
 
@@ -328,7 +328,7 @@ href="../Context.html#method-i-debug">Bauxite::Context#debug</a>).</p>
328
328
 
329
329
  <footer id="validator-badges" role="contentinfo">
330
330
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
331
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
331
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
332
332
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
333
333
  </footer>
334
334
 
@@ -585,7 +585,7 @@
585
585
 
586
586
  <footer id="validator-badges" role="contentinfo">
587
587
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
588
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
588
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
589
589
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
590
590
  </footer>
591
591
 
@@ -283,7 +283,7 @@
283
283
 
284
284
  <footer id="validator-badges" role="contentinfo">
285
285
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
286
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
286
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
287
287
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
288
288
  </footer>
289
289
 
@@ -371,7 +371,7 @@ parser can&#39;t handle the file.</p>
371
371
 
372
372
  <footer id="validator-badges" role="contentinfo">
373
373
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
374
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
374
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
375
375
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
376
376
  </footer>
377
377
 
@@ -197,7 +197,7 @@
197
197
 
198
198
  <footer id="validator-badges" role="contentinfo">
199
199
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
200
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
200
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
201
201
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
202
202
  </footer>
203
203
 
@@ -97,10 +97,10 @@
97
97
 
98
98
  <li ><a href="#method-i-attr">#attr</a>
99
99
 
100
- <li ><a href="#method-i-default">#default</a>
101
-
102
100
  <li ><a href="#method-i-frame">#frame</a>
103
101
 
102
+ <li ><a href="#method-i-sid">#sid</a>
103
+
104
104
  <li ><a href="#method-i-smart">#smart</a>
105
105
 
106
106
  </ul>
@@ -302,10 +302,10 @@ elements using XPATH expressions.</a></p>
302
302
  </div>
303
303
 
304
304
 
305
- <div id="method-i-default" class="method-detail ">
305
+ <div id="method-i-frame" class="method-detail ">
306
306
 
307
307
  <div class="method-heading">
308
- <span class="method-name">default</span><span
308
+ <span class="method-name">frame</span><span
309
309
  class="method-args">(arg, &block)</span>
310
310
 
311
311
  <span class="method-click-advice">click to toggle source</span>
@@ -315,25 +315,49 @@ elements using XPATH expressions.</a></p>
315
315
 
316
316
  <div class="method-description">
317
317
 
318
- <p>Select an element by id suffix.</p>
318
+ <p>Change the selector scope to the given frame and finds an element in that
319
+ frame.</p>
319
320
 
320
- <p>This is the default selector. Any selector strings that do not contain an
321
- equal sign (i.e. &#39;=&#39;) will use this selector.</p>
321
+ <p>This is a composite selector. The frame selector syntax is:</p>
322
+
323
+ <pre>frame=|frame_selector|child_selector</pre>
324
+
325
+ <p>Where <code>frame_selector</code> is any selector available that matches
326
+ the target frame, <code>child_selector</code> is any selector available
327
+ that matches the target element inside the target frame.</p>
328
+
329
+ <p>Note that the &#39;|&#39; character can be replaced with any
330
+ single-character delimiter.</p>
331
+
332
+ <p>Also note that frame selectors can be embedded to select a frame inside a
333
+ frame. To accompilish this, <code>child_selector</code> can be a frame
334
+ selector.</p>
322
335
 
323
336
  <p>For example:</p>
324
337
 
325
- <pre class="ruby"><span class="ruby-comment"># assuming &lt;div id=&quot;strange_uuid_like_stuff_myDiv&quot;&gt;foo&lt;/div&gt;</span>
326
- <span class="ruby-identifier">assert</span> <span class="ruby-identifier">myDiv</span> <span class="ruby-string">&quot;foo&quot;</span>
327
- <span class="ruby-comment"># =&gt; matches the element above.</span>
338
+ <pre class="ruby"><span class="ruby-comment"># assuming &lt;iframe class=&quot;myframe&quot;&gt;</span>
339
+ <span class="ruby-comment"># &lt;div id=&quot;child&quot;&gt;foo&lt;/div&gt;</span>
340
+ <span class="ruby-comment"># &lt;/iframe&gt;</span>
341
+ <span class="ruby-identifier">assert</span> <span class="ruby-string">&quot;frame=|css=.myframe|child&quot;</span> <span class="ruby-string">&quot;foo&quot;</span>
342
+ <span class="ruby-comment"># =&gt; matches the &#39;child&#39; element above.</span>
328
343
  </pre>
329
344
 
330
345
 
331
346
 
332
347
 
333
- <div class="method-source-code" id="default-source">
334
- <pre><span class="ruby-comment"># File lib/bauxite/selectors/default.rb, line 35</span>
335
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">default</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
336
- <span class="ruby-identifier">selenium_find</span>(<span class="ruby-value">:css</span>, <span class="ruby-node">&quot;[id$=&#39;#{arg.gsub(&quot;&#39;&quot;, &quot;\\&#39;&quot;)}&#39;]&quot;</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
348
+ <div class="method-source-code" id="frame-source">
349
+ <pre><span class="ruby-comment"># File lib/bauxite/selectors/frame.rb, line 48</span>
350
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">frame</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
351
+ <span class="ruby-identifier">delimiter</span> = <span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span>]
352
+ <span class="ruby-identifier">items</span> = <span class="ruby-identifier">arg</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">split</span>(<span class="ruby-identifier">delimiter</span>, <span class="ruby-value">2</span>)
353
+ <span class="ruby-identifier">find</span>(<span class="ruby-identifier">items</span>[<span class="ruby-value">0</span>]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
354
+ <span class="ruby-keyword">begin</span>
355
+ <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">frame</span> <span class="ruby-identifier">f</span>
356
+ <span class="ruby-identifier">find</span>(<span class="ruby-identifier">items</span>[<span class="ruby-value">1</span>], <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
357
+ <span class="ruby-keyword">ensure</span>
358
+ <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">default_content</span>
359
+ <span class="ruby-keyword">end</span>
360
+ <span class="ruby-keyword">end</span>
337
361
  <span class="ruby-keyword">end</span></pre>
338
362
  </div>
339
363
 
@@ -345,10 +369,10 @@ equal sign (i.e. &#39;=&#39;) will use this selector.</p>
345
369
  </div>
346
370
 
347
371
 
348
- <div id="method-i-frame" class="method-detail ">
372
+ <div id="method-i-sid" class="method-detail ">
349
373
 
350
374
  <div class="method-heading">
351
- <span class="method-name">frame</span><span
375
+ <span class="method-name">sid</span><span
352
376
  class="method-args">(arg, &block)</span>
353
377
 
354
378
  <span class="method-click-advice">click to toggle source</span>
@@ -358,49 +382,25 @@ equal sign (i.e. &#39;=&#39;) will use this selector.</p>
358
382
 
359
383
  <div class="method-description">
360
384
 
361
- <p>Change the selector scope to the given frame and finds an element in that
362
- frame.</p>
363
-
364
- <p>This is a composite selector. The frame selector syntax is:</p>
365
-
366
- <pre>frame=|frame_selector|child_selector</pre>
367
-
368
- <p>Where <code>frame_selector</code> is any selector available that matches
369
- the target frame, <code>child_selector</code> is any selector available
370
- that matches the target element inside the target frame.</p>
371
-
372
- <p>Note that the &#39;|&#39; character can be replaced with any
373
- single-character delimiter.</p>
385
+ <p>Select an element by id suffix.</p>
374
386
 
375
- <p>Also note that frame selectors can be embedded to select a frame inside a
376
- frame. To accompilish this, <code>child_selector</code> can be a frame
377
- selector.</p>
387
+ <p>This is the default selector. Any selector strings that do not contain an
388
+ equal sign (i.e. &#39;=&#39;) will use this selector.</p>
378
389
 
379
390
  <p>For example:</p>
380
391
 
381
- <pre class="ruby"><span class="ruby-comment"># assuming &lt;iframe class=&quot;myframe&quot;&gt;</span>
382
- <span class="ruby-comment"># &lt;div id=&quot;child&quot;&gt;foo&lt;/div&gt;</span>
383
- <span class="ruby-comment"># &lt;/iframe&gt;</span>
384
- <span class="ruby-identifier">assert</span> <span class="ruby-string">&quot;frame=|css=.myframe|child&quot;</span> <span class="ruby-string">&quot;foo&quot;</span>
385
- <span class="ruby-comment"># =&gt; matches the &#39;child&#39; element above.</span>
392
+ <pre class="ruby"><span class="ruby-comment"># assuming &lt;div id=&quot;strange_uuid_like_stuff_myDiv&quot;&gt;foo&lt;/div&gt;</span>
393
+ <span class="ruby-identifier">assert</span> <span class="ruby-identifier">sid</span>=<span class="ruby-identifier">myDiv</span> <span class="ruby-string">&quot;foo&quot;</span>
394
+ <span class="ruby-comment"># =&gt; matches the element above.</span>
386
395
  </pre>
387
396
 
388
397
 
389
398
 
390
399
 
391
- <div class="method-source-code" id="frame-source">
392
- <pre><span class="ruby-comment"># File lib/bauxite/selectors/frame.rb, line 48</span>
393
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">frame</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
394
- <span class="ruby-identifier">delimiter</span> = <span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span>]
395
- <span class="ruby-identifier">items</span> = <span class="ruby-identifier">arg</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">split</span>(<span class="ruby-identifier">delimiter</span>, <span class="ruby-value">2</span>)
396
- <span class="ruby-identifier">frame</span> = <span class="ruby-identifier">find</span>(<span class="ruby-identifier">items</span>[<span class="ruby-value">0</span>])
397
-
398
- <span class="ruby-keyword">begin</span>
399
- <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">frame</span> <span class="ruby-identifier">frame</span>
400
- <span class="ruby-identifier">find</span>(<span class="ruby-identifier">items</span>[<span class="ruby-value">1</span>], <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
401
- <span class="ruby-keyword">ensure</span>
402
- <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">switch_to</span>.<span class="ruby-identifier">default_content</span>
403
- <span class="ruby-keyword">end</span>
400
+ <div class="method-source-code" id="sid-source">
401
+ <pre><span class="ruby-comment"># File lib/bauxite/selectors/sid.rb, line 35</span>
402
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">sid</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
403
+ <span class="ruby-identifier">selenium_find</span>(<span class="ruby-value">:css</span>, <span class="ruby-node">&quot;[id$=&#39;#{arg.gsub(&quot;&#39;&quot;, &quot;\\&#39;&quot;)}&#39;]&quot;</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
404
404
  <span class="ruby-keyword">end</span></pre>
405
405
  </div>
406
406
 
@@ -466,7 +466,7 @@ child control element, including input, select, textarea and button).</p>
466
466
  <pre><span class="ruby-comment"># File lib/bauxite/selectors/smart.rb, line 46</span>
467
467
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">smart</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
468
468
  <span class="ruby-identifier">b</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> }
469
- <span class="ruby-identifier">target</span> = <span class="ruby-identifier">_smart_try_find</span> { <span class="ruby-identifier">default</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>) }
469
+ <span class="ruby-identifier">target</span> = <span class="ruby-identifier">_smart_try_find</span> { <span class="ruby-identifier">sid</span>(<span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>) }
470
470
  <span class="ruby-identifier">target</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">_smart_try_find</span> { <span class="ruby-identifier">selenium_find</span>(<span class="ruby-value">:name</span>, <span class="ruby-identifier">arg</span>) }
471
471
  <span class="ruby-identifier">target</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">_smart_try_find</span> { <span class="ruby-identifier">selenium_find</span>(<span class="ruby-value">:class_name</span>, <span class="ruby-identifier">arg</span>) }
472
472
  <span class="ruby-identifier">target</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">_smart_try_find</span> { <span class="ruby-identifier">attr</span>(<span class="ruby-string">&quot;id*:&quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>) }
@@ -502,7 +502,7 @@ child control element, including input, select, textarea and button).</p>
502
502
 
503
503
  <footer id="validator-badges" role="contentinfo">
504
504
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
505
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
505
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
506
506
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
507
507
  </footer>
508
508
 
@@ -112,7 +112,7 @@
112
112
 
113
113
  <div class="method-heading">
114
114
  <span class="method-name">new</span><span
115
- class="method-args">(ctx)</span>
115
+ class="method-args">(ctx, default_selector)</span>
116
116
 
117
117
  <span class="method-click-advice">click to toggle source</span>
118
118
 
@@ -128,8 +128,9 @@
128
128
 
129
129
  <div class="method-source-code" id="new-source">
130
130
  <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 28</span>
131
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ctx</span>)
131
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ctx</span>, <span class="ruby-identifier">default_selector</span>)
132
132
  <span class="ruby-ivar">@ctx</span> = <span class="ruby-identifier">ctx</span>
133
+ <span class="ruby-ivar">@default</span> = <span class="ruby-identifier">default_selector</span>
133
134
  <span class="ruby-keyword">end</span></pre>
134
135
  </div>
135
136
 
@@ -185,13 +186,17 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
185
186
 
186
187
 
187
188
  <div class="method-source-code" id="find-source">
188
- <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 48</span>
189
+ <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 49</span>
189
190
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">selector</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
190
191
  <span class="ruby-identifier">data</span> = <span class="ruby-identifier">selector</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;=&#39;</span>, <span class="ruby-value">2</span>)
191
- <span class="ruby-identifier">type</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-string">&quot;default&quot;</span>
192
+ <span class="ruby-identifier">type</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value">0</span>]
193
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value">-1</span>]
194
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^[a-z_]+$/i</span>
195
+ <span class="ruby-identifier">type</span> = <span class="ruby-ivar">@default</span>
196
+ <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">selector</span>
197
+ <span class="ruby-keyword">end</span>
192
198
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;Invalid selector type &#39;#{type}&#39;&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
193
199
 
194
- <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">data</span>[<span class="ruby-value">-1</span>]
195
200
  <span class="ruby-identifier">custom_selectors</span> = <span class="ruby-constant">Context</span><span class="ruby-operator">::</span><span class="ruby-identifier">selectors</span>(<span class="ruby-keyword">false</span>)
196
201
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span> , <span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">custom_selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span>
197
202
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span><span class="ruby-operator">+</span><span class="ruby-string">&#39;_selector&#39;</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">custom_selectors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">type</span><span class="ruby-operator">+</span><span class="ruby-string">&#39;_selector&#39;</span>
@@ -247,7 +252,7 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
247
252
 
248
253
 
249
254
  <div class="method-source-code" id="selenium_find-source">
250
- <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 75</span>
255
+ <pre><span class="ruby-comment"># File lib/bauxite/core/selector.rb, line 80</span>
251
256
  <span class="ruby-keyword">def</span> <span class="ruby-identifier">selenium_find</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">selector</span>)
252
257
  <span class="ruby-identifier">element</span> = <span class="ruby-ivar">@ctx</span>.<span class="ruby-identifier">driver</span>.<span class="ruby-identifier">find_element</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">selector</span>)
253
258
  <span class="ruby-keyword">yield</span> <span class="ruby-identifier">element</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
@@ -271,7 +276,7 @@ href="Context.html#method-i-find">Bauxite::Context#find</a>.</p>
271
276
 
272
277
  <footer id="validator-badges" role="contentinfo">
273
278
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
274
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
279
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
275
280
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
276
281
  </footer>
277
282
 
data/doc/README_md.html CHANGED
@@ -234,6 +234,10 @@ Bauxite Selectors</a></p>
234
234
  href="http://pzavolinsky.github.io/bauxite/Bauxite/Selector.html#class-Bauxite::Selector-label-Standard+Selenium+Selectors">Selenium
235
235
  Standard Selectors</a></p>
236
236
  </li><li>
237
+ <p><a
238
+ href="http://pzavolinsky.github.io/bauxite/Bauxite/Context.html#class-Bauxite::Context-label-Context+variables">Bauxite
239
+ Variables</a></p>
240
+ </li><li>
237
241
  <p><a href="http://pzavolinsky.github.io/bauxite/Bauxite/Action.html">Creating
238
242
  new Actions</a></p>
239
243
  </li><li>
@@ -432,7 +436,7 @@ we can type:</p>
432
436
 
433
437
  <footer id="validator-badges" role="contentinfo">
434
438
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
435
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
439
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
436
440
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
437
441
  </footer>
438
442
 
data/doc/created.rid CHANGED
@@ -1,46 +1,46 @@
1
- Tue, 28 Jan 2014 17:04:45 -0300
2
- README.md Tue, 28 Jan 2014 16:48:43 -0300
3
- lib/bauxite/actions/js.rb Mon, 27 Jan 2014 11:02:44 -0300
4
- lib/bauxite/actions/exec.rb Mon, 27 Jan 2014 11:02:44 -0300
5
- lib/bauxite/actions/wait.rb Mon, 27 Jan 2014 11:02:44 -0300
6
- lib/bauxite/actions/assert.rb Mon, 27 Jan 2014 11:02:44 -0300
7
- lib/bauxite/actions/ruby.rb Mon, 27 Jan 2014 11:02:44 -0300
8
- lib/bauxite/actions/store.rb Mon, 27 Jan 2014 11:02:44 -0300
9
- lib/bauxite/actions/assertv.rb Mon, 27 Jan 2014 11:02:44 -0300
10
- lib/bauxite/actions/alias.rb Mon, 27 Jan 2014 11:02:44 -0300
11
- lib/bauxite/actions/tryload.rb Mon, 27 Jan 2014 11:02:44 -0300
12
- lib/bauxite/actions/test.rb Mon, 27 Jan 2014 11:02:44 -0300
13
- lib/bauxite/actions/load.rb Mon, 27 Jan 2014 11:02:44 -0300
14
- lib/bauxite/actions/submit.rb Tue, 28 Jan 2014 16:05:51 -0300
15
- lib/bauxite/actions/open.rb Mon, 27 Jan 2014 11:02:44 -0300
16
- lib/bauxite/actions/reset.rb Mon, 27 Jan 2014 11:02:44 -0300
17
- lib/bauxite/actions/write.rb Mon, 27 Jan 2014 11:02:44 -0300
18
- lib/bauxite/actions/replace.rb Mon, 27 Jan 2014 11:02:44 -0300
19
- lib/bauxite/actions/select.rb Tue, 28 Jan 2014 16:04:12 -0300
20
- lib/bauxite/actions/echo.rb Mon, 27 Jan 2014 11:02:44 -0300
21
- lib/bauxite/actions/set.rb Mon, 27 Jan 2014 11:02:44 -0300
22
- lib/bauxite/actions/params.rb Mon, 27 Jan 2014 11:02:44 -0300
23
- lib/bauxite/actions/debug.rb Mon, 27 Jan 2014 11:02:44 -0300
24
- lib/bauxite/actions/return.rb Mon, 27 Jan 2014 11:02:44 -0300
25
- lib/bauxite/actions/click.rb Mon, 27 Jan 2014 11:02:44 -0300
26
- lib/bauxite/actions/source.rb Mon, 27 Jan 2014 11:02:44 -0300
27
- lib/bauxite/actions/break.rb Mon, 27 Jan 2014 11:02:44 -0300
28
- lib/bauxite/core/selector.rb Tue, 28 Jan 2014 16:48:43 -0300
29
- lib/bauxite/core/errors.rb Mon, 27 Jan 2014 11:02:44 -0300
30
- lib/bauxite/core/context.rb Tue, 28 Jan 2014 16:48:43 -0300
31
- lib/bauxite/core/parser.rb Tue, 28 Jan 2014 16:48:43 -0300
32
- lib/bauxite/core/action.rb Tue, 28 Jan 2014 16:48:43 -0300
33
- lib/bauxite/core/logger.rb Mon, 27 Jan 2014 11:02:44 -0300
34
- lib/bauxite/parsers/default.rb Mon, 27 Jan 2014 11:02:44 -0300
35
- lib/bauxite/parsers/html.rb Mon, 27 Jan 2014 11:02:44 -0300
36
- lib/bauxite/parsers/csv.rb Mon, 27 Jan 2014 11:02:44 -0300
37
- lib/bauxite/application.rb Mon, 27 Jan 2014 11:02:44 -0300
38
- lib/bauxite/selectors/frame.rb Mon, 27 Jan 2014 11:02:44 -0300
39
- lib/bauxite/selectors/attr.rb Mon, 27 Jan 2014 11:02:44 -0300
40
- lib/bauxite/selectors/default.rb Mon, 27 Jan 2014 11:02:44 -0300
41
- lib/bauxite/selectors/smart.rb Tue, 28 Jan 2014 16:59:18 -0300
42
- lib/bauxite/loggers/terminal.rb Mon, 27 Jan 2014 11:04:47 -0300
43
- lib/bauxite/loggers/echo.rb Mon, 27 Jan 2014 11:03:37 -0300
44
- lib/bauxite/loggers/composite.rb Mon, 27 Jan 2014 11:02:44 -0300
45
- lib/bauxite/loggers/xterm.rb Mon, 27 Jan 2014 11:02:44 -0300
46
- lib/bauxite/loggers/file.rb Mon, 27 Jan 2014 11:02:44 -0300
1
+ Tue, 28 Jan 2014 21:15:42 -0300
2
+ README.md Tue, 28 Jan 2014 20:52:06 -0300
3
+ lib/bauxite/actions/break.rb Mon, 27 Jan 2014 20:58:50 -0300
4
+ lib/bauxite/actions/assert.rb Mon, 27 Jan 2014 20:58:50 -0300
5
+ lib/bauxite/actions/wait.rb Mon, 27 Jan 2014 20:58:50 -0300
6
+ lib/bauxite/actions/assertv.rb Mon, 27 Jan 2014 20:58:50 -0300
7
+ lib/bauxite/actions/open.rb Tue, 28 Jan 2014 20:06:47 -0300
8
+ lib/bauxite/actions/submit.rb Tue, 28 Jan 2014 19:04:23 -0300
9
+ lib/bauxite/actions/return.rb Mon, 27 Jan 2014 20:58:50 -0300
10
+ lib/bauxite/actions/select.rb Tue, 28 Jan 2014 19:04:23 -0300
11
+ lib/bauxite/actions/ruby.rb Mon, 27 Jan 2014 20:58:50 -0300
12
+ lib/bauxite/actions/echo.rb Mon, 27 Jan 2014 20:58:50 -0300
13
+ lib/bauxite/actions/js.rb Mon, 27 Jan 2014 20:58:50 -0300
14
+ lib/bauxite/actions/replace.rb Mon, 27 Jan 2014 20:58:50 -0300
15
+ lib/bauxite/actions/write.rb Mon, 27 Jan 2014 20:58:50 -0300
16
+ lib/bauxite/actions/params.rb Mon, 27 Jan 2014 20:58:50 -0300
17
+ lib/bauxite/actions/set.rb Mon, 27 Jan 2014 20:58:50 -0300
18
+ lib/bauxite/actions/click.rb Mon, 27 Jan 2014 20:58:50 -0300
19
+ lib/bauxite/actions/reset.rb Mon, 27 Jan 2014 20:58:50 -0300
20
+ lib/bauxite/actions/debug.rb Mon, 27 Jan 2014 20:58:50 -0300
21
+ lib/bauxite/actions/source.rb Mon, 27 Jan 2014 20:58:50 -0300
22
+ lib/bauxite/actions/exec.rb Mon, 27 Jan 2014 20:58:50 -0300
23
+ lib/bauxite/actions/store.rb Mon, 27 Jan 2014 20:58:50 -0300
24
+ lib/bauxite/actions/tryload.rb Mon, 27 Jan 2014 20:58:50 -0300
25
+ lib/bauxite/actions/load.rb Mon, 27 Jan 2014 20:58:50 -0300
26
+ lib/bauxite/actions/test.rb Mon, 27 Jan 2014 20:58:50 -0300
27
+ lib/bauxite/actions/alias.rb Mon, 27 Jan 2014 20:58:50 -0300
28
+ lib/bauxite/parsers/html.rb Mon, 27 Jan 2014 20:58:50 -0300
29
+ lib/bauxite/parsers/csv.rb Mon, 27 Jan 2014 20:58:50 -0300
30
+ lib/bauxite/parsers/default.rb Mon, 27 Jan 2014 20:58:50 -0300
31
+ lib/bauxite/application.rb Tue, 28 Jan 2014 19:30:07 -0300
32
+ lib/bauxite/core/errors.rb Mon, 27 Jan 2014 20:58:50 -0300
33
+ lib/bauxite/core/selector.rb Tue, 28 Jan 2014 21:05:35 -0300
34
+ lib/bauxite/core/context.rb Tue, 28 Jan 2014 21:09:59 -0300
35
+ lib/bauxite/core/logger.rb Mon, 27 Jan 2014 20:58:50 -0300
36
+ lib/bauxite/core/action.rb Mon, 27 Jan 2014 20:58:50 -0300
37
+ lib/bauxite/core/parser.rb Mon, 27 Jan 2014 20:58:50 -0300
38
+ lib/bauxite/selectors/sid.rb Tue, 28 Jan 2014 19:32:32 -0300
39
+ lib/bauxite/selectors/attr.rb Mon, 27 Jan 2014 20:58:50 -0300
40
+ lib/bauxite/selectors/smart.rb Tue, 28 Jan 2014 21:11:30 -0300
41
+ lib/bauxite/selectors/frame.rb Tue, 28 Jan 2014 19:38:40 -0300
42
+ lib/bauxite/loggers/terminal.rb Mon, 27 Jan 2014 20:58:50 -0300
43
+ lib/bauxite/loggers/file.rb Mon, 27 Jan 2014 20:58:50 -0300
44
+ lib/bauxite/loggers/composite.rb Mon, 27 Jan 2014 20:58:50 -0300
45
+ lib/bauxite/loggers/echo.rb Mon, 27 Jan 2014 20:58:50 -0300
46
+ lib/bauxite/loggers/xterm.rb Mon, 27 Jan 2014 20:58:50 -0300