mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
Update selenium on rails using 'official' git repo
git://github.com/paytonrules/selenium-on-rails.git
This commit is contained in:
parent
198f3240b8
commit
9b504b3e47
159 changed files with 16409 additions and 11794 deletions
|
|
@ -1,265 +1,265 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumController</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumController</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/controllers/selenium_controller_rb.html">
|
||||
lib/controllers/selenium_controller.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
ActionController::Base
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000006">record</a>
|
||||
<a href="#M000003">setup</a>
|
||||
<a href="#M000005">support_file</a>
|
||||
<a href="#M000004">test_file</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="SeleniumOnRails/FixtureLoader.html">SeleniumOnRails::FixtureLoader</a></span>
|
||||
<span class="include-name"><a href="SeleniumOnRails/Renderer.html">SeleniumOnRails::Renderer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000006" class="method-signature">
|
||||
<span class="method-name">record</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000006-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 50</span>
|
||||
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record</span>
|
||||
51: <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">record_table</span>
|
||||
52:
|
||||
53: <span class="ruby-ivar">@result</span> = {<span class="ruby-value str">'resultDir'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">dir</span>}
|
||||
54: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">in</span> [<span class="ruby-value str">'result'</span>, <span class="ruby-value str">'numTestFailures'</span>, <span class="ruby-value str">'numTestPasses'</span>, <span class="ruby-value str">'numCommandFailures'</span>, <span class="ruby-value str">'numCommandPasses'</span>, <span class="ruby-value str">'numCommandErrors'</span>, <span class="ruby-value str">'totalTime'</span>]
|
||||
55: <span class="ruby-ivar">@result</span>[<span class="ruby-identifier">p</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">p</span>]
|
||||
56: <span class="ruby-keyword kw">end</span>
|
||||
57: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">log_path</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:logFile</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'default.yml'</span>), <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-ivar">@result</span>, <span class="ruby-identifier">f</span>)}
|
||||
58:
|
||||
59: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'record.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
60: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000003" class="method-signature">
|
||||
<span class="method-name">setup</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000003-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
||||
8: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">:keep_session</span>
|
||||
9: <span class="ruby-identifier">reset_session</span>
|
||||
10: <span class="ruby-ivar">@session_wiped</span> = <span class="ruby-keyword kw">true</span>
|
||||
11: <span class="ruby-keyword kw">end</span>
|
||||
12: <span class="ruby-ivar">@cleared_tables</span> = <span class="ruby-identifier">clear_tables</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:clear_tables</span>].<span class="ruby-identifier">to_s</span>
|
||||
13: <span class="ruby-ivar">@loaded_fixtures</span> = <span class="ruby-identifier">load_fixtures</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:fixtures</span>].<span class="ruby-identifier">to_s</span>
|
||||
14: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'setup.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000005" class="method-signature">
|
||||
<span class="method-name">support_file</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000005-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 34</span>
|
||||
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">support_file</span>
|
||||
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:filename</span>].<span class="ruby-identifier">empty?</span>
|
||||
36: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:filename</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'TestRunner.html'</span>, <span class="ruby-identifier">:test</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tests'</span>
|
||||
37: <span class="ruby-keyword kw">return</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
39:
|
||||
40: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span> <span class="ruby-identifier">selenium_path</span>, <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:filename</span>]
|
||||
41: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-identifier">filename</span>
|
||||
42: <span class="ruby-identifier">type</span> = <span class="ruby-constant">WEBrick</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPUtils</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultMimeTypes</span>[<span class="ruby-identifier">$1</span>.<span class="ruby-identifier">downcase</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\.(\w+)$/</span>
|
||||
43: <span class="ruby-identifier">type</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'text/html'</span>
|
||||
44: <span class="ruby-identifier">send_file</span> <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">type</span>, <span class="ruby-identifier">:disposition</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'inline'</span>, <span class="ruby-identifier">:stream</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>
|
||||
45: <span class="ruby-keyword kw">else</span>
|
||||
46: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Not found'</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
48: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000004" class="method-signature">
|
||||
<span class="method-name">test_file</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000004-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 17</span>
|
||||
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_file</span>
|
||||
18: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>] = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'TestSuite.html'</span>
|
||||
19: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span> <span class="ruby-identifier">selenium_tests_path</span>, <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>]
|
||||
20: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">filename</span>
|
||||
21: <span class="ruby-ivar">@suite_path</span> = <span class="ruby-identifier">filename</span>
|
||||
22: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'test_suite.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
23: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span> <span class="ruby-identifier">filename</span>
|
||||
24: <span class="ruby-identifier">render_test_case</span> <span class="ruby-identifier">filename</span>
|
||||
25: <span class="ruby-keyword kw">else</span>
|
||||
26: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">selenium_tests_path</span>
|
||||
27: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Not found'</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
28: <span class="ruby-keyword kw">else</span>
|
||||
29: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-node">"Did not find the Selenium tests path (#{selenium_tests_path}). Run script/generate selenium"</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
30: <span class="ruby-keyword kw">end</span>
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
32: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumController</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumController</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/controllers/selenium_controller_rb.html">
|
||||
lib/controllers/selenium_controller.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
ActionController::Base
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000006">record</a>
|
||||
<a href="#M000003">setup</a>
|
||||
<a href="#M000005">support_file</a>
|
||||
<a href="#M000004">test_file</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="SeleniumOnRails/FixtureLoader.html">SeleniumOnRails::FixtureLoader</a></span>
|
||||
<span class="include-name"><a href="SeleniumOnRails/Renderer.html">SeleniumOnRails::Renderer</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000006" class="method-signature">
|
||||
<span class="method-name">record</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000006-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 50</span>
|
||||
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record</span>
|
||||
51: <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">record_table</span>
|
||||
52:
|
||||
53: <span class="ruby-ivar">@result</span> = {<span class="ruby-value str">'resultDir'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">dir</span>}
|
||||
54: <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">in</span> [<span class="ruby-value str">'result'</span>, <span class="ruby-value str">'numTestFailures'</span>, <span class="ruby-value str">'numTestPasses'</span>, <span class="ruby-value str">'numCommandFailures'</span>, <span class="ruby-value str">'numCommandPasses'</span>, <span class="ruby-value str">'numCommandErrors'</span>, <span class="ruby-value str">'totalTime'</span>]
|
||||
55: <span class="ruby-ivar">@result</span>[<span class="ruby-identifier">p</span>] = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">p</span>]
|
||||
56: <span class="ruby-keyword kw">end</span>
|
||||
57: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">log_path</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:logFile</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'default.yml'</span>), <span class="ruby-value str">'w'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-ivar">@result</span>, <span class="ruby-identifier">f</span>)}
|
||||
58:
|
||||
59: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'record.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
60: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000003" class="method-signature">
|
||||
<span class="method-name">setup</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000003-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
|
||||
8: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">:keep_session</span>
|
||||
9: <span class="ruby-identifier">reset_session</span>
|
||||
10: <span class="ruby-ivar">@session_wiped</span> = <span class="ruby-keyword kw">true</span>
|
||||
11: <span class="ruby-keyword kw">end</span>
|
||||
12: <span class="ruby-ivar">@cleared_tables</span> = <span class="ruby-identifier">clear_tables</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:clear_tables</span>].<span class="ruby-identifier">to_s</span>
|
||||
13: <span class="ruby-ivar">@loaded_fixtures</span> = <span class="ruby-identifier">load_fixtures</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:fixtures</span>].<span class="ruby-identifier">to_s</span>
|
||||
14: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'setup.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000005" class="method-signature">
|
||||
<span class="method-name">support_file</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000005-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 34</span>
|
||||
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">support_file</span>
|
||||
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:filename</span>].<span class="ruby-identifier">empty?</span>
|
||||
36: <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:filename</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'TestRunner.html'</span>, <span class="ruby-identifier">:test</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'tests'</span>
|
||||
37: <span class="ruby-keyword kw">return</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
39:
|
||||
40: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span> <span class="ruby-identifier">selenium_path</span>, <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:filename</span>]
|
||||
41: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span> <span class="ruby-identifier">filename</span>
|
||||
42: <span class="ruby-identifier">type</span> = <span class="ruby-constant">WEBrick</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPUtils</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultMimeTypes</span>[<span class="ruby-identifier">$1</span>.<span class="ruby-identifier">downcase</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\.(\w+)$/</span>
|
||||
43: <span class="ruby-identifier">type</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'text/html'</span>
|
||||
44: <span class="ruby-identifier">send_file</span> <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">type</span>, <span class="ruby-identifier">:disposition</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'inline'</span>, <span class="ruby-identifier">:stream</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>
|
||||
45: <span class="ruby-keyword kw">else</span>
|
||||
46: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Not found'</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
48: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000004" class="method-signature">
|
||||
<span class="method-name">test_file</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000004-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/controllers/selenium_controller.rb, line 17</span>
|
||||
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_file</span>
|
||||
18: <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>] = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'TestSuite.html'</span>
|
||||
19: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span> <span class="ruby-identifier">selenium_tests_path</span>, <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:testname</span>]
|
||||
20: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">filename</span>
|
||||
21: <span class="ruby-ivar">@suite_path</span> = <span class="ruby-identifier">filename</span>
|
||||
22: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'test_suite.rhtml'</span>), <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout_path</span>
|
||||
23: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span> <span class="ruby-identifier">filename</span>
|
||||
24: <span class="ruby-identifier">render_test_case</span> <span class="ruby-identifier">filename</span>
|
||||
25: <span class="ruby-keyword kw">else</span>
|
||||
26: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">selenium_tests_path</span>
|
||||
27: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Not found'</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
28: <span class="ruby-keyword kw">else</span>
|
||||
29: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-node">"Did not find the Selenium tests path (#{selenium_tests_path}). Run script/generate selenium"</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">></span> <span class="ruby-value">404</span>
|
||||
30: <span class="ruby-keyword kw">end</span>
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
32: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,148 +1,148 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_helper_rb.html">
|
||||
lib/selenium_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000008">test_case_name</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="SeleniumOnRails/SuiteRenderer.html">SeleniumOnRails::SuiteRenderer</a></span>
|
||||
<span class="include-name"><a href="SeleniumOnRails/FixtureLoader.html">SeleniumOnRails::FixtureLoader</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000008" class="method-signature">
|
||||
<span class="method-name">test_case_name</span><span class="method-args">(filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000008-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_helper.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_case_name</span> <span class="ruby-identifier">filename</span>
|
||||
6: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\..*/</span>,<span class="ruby-value str">''</span>).<span class="ruby-identifier">humanize</span>
|
||||
7: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_helper_rb.html">
|
||||
lib/selenium_helper.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000008">test_case_name</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="SeleniumOnRails/SuiteRenderer.html">SeleniumOnRails::SuiteRenderer</a></span>
|
||||
<span class="include-name"><a href="SeleniumOnRails/FixtureLoader.html">SeleniumOnRails::FixtureLoader</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000008" class="method-signature">
|
||||
<span class="method-name">test_case_name</span><span class="method-args">(filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000008-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_helper.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_case_name</span> <span class="ruby-identifier">filename</span>
|
||||
6: <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/\..*/</span>,<span class="ruby-value str">''</span>).<span class="ruby-identifier">humanize</span>
|
||||
7: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,124 +1,126 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_on_rails/paths_rb.html">
|
||||
lib/selenium_on_rails/paths.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/selenium_on_rails_rb.html">
|
||||
lib/selenium_on_rails.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="SeleniumOnRails/FixtureLoader.html" class="link">SeleniumOnRails::FixtureLoader</a><br />
|
||||
Module <a href="SeleniumOnRails/PartialsSupport.html" class="link">SeleniumOnRails::PartialsSupport</a><br />
|
||||
Module <a href="SeleniumOnRails/Paths.html" class="link">SeleniumOnRails::Paths</a><br />
|
||||
Module <a href="SeleniumOnRails/Renderer.html" class="link">SeleniumOnRails::Renderer</a><br />
|
||||
Module <a href="SeleniumOnRails/SuiteRenderer.html" class="link">SeleniumOnRails::SuiteRenderer</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderAccessors.html" class="link">SeleniumOnRails::TestBuilderAccessors</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderActions.html" class="link">SeleniumOnRails::TestBuilderActions</a><br />
|
||||
Class <a href="SeleniumOnRails/RSelenese.html" class="link">SeleniumOnRails::RSelenese</a><br />
|
||||
Class <a href="SeleniumOnRails/Selenese.html" class="link">SeleniumOnRails::Selenese</a><br />
|
||||
Class <a href="SeleniumOnRails/TestBuilder.html" class="link">SeleniumOnRails::TestBuilder</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_on_rails/paths_rb.html">
|
||||
lib/selenium_on_rails/paths.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/selenium_on_rails_rb.html">
|
||||
lib/selenium_on_rails.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="SeleniumOnRails/FixtureLoader.html" class="link">SeleniumOnRails::FixtureLoader</a><br />
|
||||
Module <a href="SeleniumOnRails/PartialsSupport.html" class="link">SeleniumOnRails::PartialsSupport</a><br />
|
||||
Module <a href="SeleniumOnRails/Paths.html" class="link">SeleniumOnRails::Paths</a><br />
|
||||
Module <a href="SeleniumOnRails/Renderer.html" class="link">SeleniumOnRails::Renderer</a><br />
|
||||
Module <a href="SeleniumOnRails/SuiteRenderer.html" class="link">SeleniumOnRails::SuiteRenderer</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderAccessors.html" class="link">SeleniumOnRails::TestBuilderAccessors</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderActions.html" class="link">SeleniumOnRails::TestBuilderActions</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderUserAccessors.html" class="link">SeleniumOnRails::TestBuilderUserAccessors</a><br />
|
||||
Module <a href="SeleniumOnRails/TestBuilderUserActions.html" class="link">SeleniumOnRails::TestBuilderUserActions</a><br />
|
||||
Class <a href="SeleniumOnRails/RSelenese.html" class="link">SeleniumOnRails::RSelenese</a><br />
|
||||
Class <a href="SeleniumOnRails/Selenese.html" class="link">SeleniumOnRails::Selenese</a><br />
|
||||
Class <a href="SeleniumOnRails/TestBuilder.html" class="link">SeleniumOnRails::TestBuilder</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,231 +1,231 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::FixtureLoader</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::FixtureLoader</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/fixture_loader_rb.html">
|
||||
lib/selenium_on_rails/fixture_loader.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000049">available_fixtures</a>
|
||||
<a href="#M000051">clear_tables</a>
|
||||
<a href="#M000050">load_fixtures</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000049" class="method-detail">
|
||||
<a name="M000049"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000049" class="method-signature">
|
||||
<span class="method-name">available_fixtures</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000049-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 6</span>
|
||||
6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">available_fixtures</span>
|
||||
7: <span class="ruby-identifier">fixtures</span> = {}
|
||||
8: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">fixtures_path</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span>
|
||||
9: <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{path}**/*.{yml,csv}"</span>]
|
||||
10: <span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
||||
11: <span class="ruby-identifier">rel_path</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">''</span>)
|
||||
12: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">skip_file?</span> <span class="ruby-identifier">rel_path</span>
|
||||
13: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">rel_path</span>)
|
||||
14: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture_set</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
|
||||
15: <span class="ruby-identifier">fixture</span> = <span class="ruby-identifier">rel_path</span>.<span class="ruby-identifier">sub</span> <span class="ruby-regexp re">/\.[^.]*$/</span>, <span class="ruby-value str">''</span>
|
||||
16: <span class="ruby-identifier">fixtures</span>[<span class="ruby-identifier">fixture_set</span>] <span class="ruby-operator">||=</span> []
|
||||
17: <span class="ruby-identifier">fixtures</span>[<span class="ruby-identifier">fixture_set</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">fixture</span>
|
||||
18: <span class="ruby-keyword kw">end</span>
|
||||
19:
|
||||
20: <span class="ruby-identifier">fixtures</span>
|
||||
21: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000051" class="method-detail">
|
||||
<a name="M000051"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000051" class="method-signature">
|
||||
<span class="method-name">clear_tables</span><span class="method-args">(tables)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000051-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 45</span>
|
||||
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_tables</span> <span class="ruby-identifier">tables</span>
|
||||
46: <span class="ruby-identifier">table_names</span> = <span class="ruby-identifier">tables</span>.<span class="ruby-identifier">split</span> <span class="ruby-regexp re">/\s*,\s*/</span>
|
||||
47: <span class="ruby-identifier">connection</span> = <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">connection</span>
|
||||
48: <span class="ruby-identifier">table_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">table</span><span class="ruby-operator">|</span>
|
||||
49: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">execute</span> <span class="ruby-node">"DELETE FROM #{table}"</span>
|
||||
50: <span class="ruby-keyword kw">end</span>
|
||||
51: <span class="ruby-identifier">table_names</span>
|
||||
52: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000050" class="method-detail">
|
||||
<a name="M000050"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000050" class="method-signature">
|
||||
<span class="method-name">load_fixtures</span><span class="method-args">(fixtures_param)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000050-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 23</span>
|
||||
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_fixtures</span> <span class="ruby-identifier">fixtures_param</span>
|
||||
24: <span class="ruby-identifier">available</span> = <span class="ruby-keyword kw">nil</span>
|
||||
25: <span class="ruby-identifier">fixtures</span> = <span class="ruby-identifier">fixtures_param</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\s*,\s*/</span>).<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
26: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span> <span class="ruby-identifier">f</span>
|
||||
27: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture_set</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
|
||||
28: <span class="ruby-identifier">fixture</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-identifier">f</span>
|
||||
29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'all'</span>
|
||||
30: <span class="ruby-identifier">available</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">available_fixtures</span>
|
||||
31: <span class="ruby-identifier">available</span>[<span class="ruby-identifier">fixture_set</span>]
|
||||
32: <span class="ruby-keyword kw">else</span>
|
||||
33: <span class="ruby-identifier">f</span>
|
||||
34: <span class="ruby-keyword kw">end</span>
|
||||
35: <span class="ruby-keyword kw">end</span>
|
||||
36: <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">flatten!</span>
|
||||
37: <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">reject!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">blank?</span> }
|
||||
38:
|
||||
39: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">any?</span>
|
||||
40: <span class="ruby-constant">Fixtures</span>.<span class="ruby-identifier">create_fixtures</span> <span class="ruby-identifier">fixtures_path</span>, <span class="ruby-identifier">fixtures</span>
|
||||
41: <span class="ruby-keyword kw">end</span>
|
||||
42: <span class="ruby-identifier">fixtures</span>
|
||||
43: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::FixtureLoader</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::FixtureLoader</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/fixture_loader_rb.html">
|
||||
lib/selenium_on_rails/fixture_loader.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000083">available_fixtures</a>
|
||||
<a href="#M000085">clear_tables</a>
|
||||
<a href="#M000084">load_fixtures</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000083" class="method-detail">
|
||||
<a name="M000083"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000083" class="method-signature">
|
||||
<span class="method-name">available_fixtures</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000083-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">available_fixtures</span>
|
||||
8: <span class="ruby-identifier">fixtures</span> = {}
|
||||
9: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">fixtures_path</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span>
|
||||
10: <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{path}**/*.{yml,csv}"</span>]
|
||||
11: <span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
||||
12: <span class="ruby-identifier">rel_path</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">''</span>)
|
||||
13: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">skip_file?</span> <span class="ruby-identifier">rel_path</span>
|
||||
14: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">rel_path</span>)
|
||||
15: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture_set</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
|
||||
16: <span class="ruby-identifier">fixture</span> = <span class="ruby-identifier">rel_path</span>.<span class="ruby-identifier">sub</span> <span class="ruby-regexp re">/\.[^.]*$/</span>, <span class="ruby-value str">''</span>
|
||||
17: <span class="ruby-identifier">fixtures</span>[<span class="ruby-identifier">fixture_set</span>] <span class="ruby-operator">||=</span> []
|
||||
18: <span class="ruby-identifier">fixtures</span>[<span class="ruby-identifier">fixture_set</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">fixture</span>
|
||||
19: <span class="ruby-keyword kw">end</span>
|
||||
20:
|
||||
21: <span class="ruby-identifier">fixtures</span>
|
||||
22: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000085" class="method-detail">
|
||||
<a name="M000085"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000085" class="method-signature">
|
||||
<span class="method-name">clear_tables</span><span class="method-args">(tables)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000085-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 46</span>
|
||||
46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear_tables</span> <span class="ruby-identifier">tables</span>
|
||||
47: <span class="ruby-identifier">table_names</span> = <span class="ruby-identifier">tables</span>.<span class="ruby-identifier">split</span> <span class="ruby-regexp re">/\s*,\s*/</span>
|
||||
48: <span class="ruby-identifier">connection</span> = <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">connection</span>
|
||||
49: <span class="ruby-identifier">table_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">table</span><span class="ruby-operator">|</span>
|
||||
50: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">execute</span> <span class="ruby-node">"DELETE FROM #{table}"</span>
|
||||
51: <span class="ruby-keyword kw">end</span>
|
||||
52: <span class="ruby-identifier">table_names</span>
|
||||
53: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000084" class="method-detail">
|
||||
<a name="M000084"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000084" class="method-signature">
|
||||
<span class="method-name">load_fixtures</span><span class="method-args">(fixtures_param)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000084-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/fixture_loader.rb, line 24</span>
|
||||
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_fixtures</span> <span class="ruby-identifier">fixtures_param</span>
|
||||
25: <span class="ruby-identifier">available</span> = <span class="ruby-keyword kw">nil</span>
|
||||
26: <span class="ruby-identifier">fixtures</span> = <span class="ruby-identifier">fixtures_param</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\s*,\s*/</span>).<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
27: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span> <span class="ruby-identifier">f</span>
|
||||
28: <span class="ruby-identifier">fixture_set</span> = <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture_set</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
|
||||
29: <span class="ruby-identifier">fixture</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-identifier">f</span>
|
||||
30: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixture</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'all'</span>
|
||||
31: <span class="ruby-identifier">available</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">available_fixtures</span>
|
||||
32: <span class="ruby-identifier">available</span>[<span class="ruby-identifier">fixture_set</span>]
|
||||
33: <span class="ruby-keyword kw">else</span>
|
||||
34: <span class="ruby-identifier">f</span>
|
||||
35: <span class="ruby-keyword kw">end</span>
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37: <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">flatten!</span>
|
||||
38: <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">reject!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">blank?</span> }
|
||||
39:
|
||||
40: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fixtures</span>.<span class="ruby-identifier">any?</span>
|
||||
41: <span class="ruby-constant">Fixtures</span>.<span class="ruby-identifier">create_fixtures</span> <span class="ruby-identifier">fixtures_path</span>, <span class="ruby-identifier">fixtures</span>
|
||||
42: <span class="ruby-keyword kw">end</span>
|
||||
43: <span class="ruby-identifier">fixtures</span>
|
||||
44: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,195 +1,195 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::PartialsSupport</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::PartialsSupport</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/partials_support_rb.html">
|
||||
lib/selenium_on_rails/partials_support.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Provides partials support to test cases so they can include other partial
|
||||
test cases.
|
||||
</p>
|
||||
<p>
|
||||
The partial’s commands are returned as html table rows.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000081">extract_commands_from_partial</a>
|
||||
<a href="#M000080">render_partial</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000081" class="method-detail">
|
||||
<a name="M000081"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000081" class="method-signature">
|
||||
<span class="method-name">extract_commands_from_partial</span><span class="method-args">(partial)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Extracts the commands from a partial. The partial must contain a html table
|
||||
and the first row is ignored since it cannot contain a command.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000081-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/partials_support.rb, line 19</span>
|
||||
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_commands_from_partial</span> <span class="ruby-identifier">partial</span>
|
||||
20: <span class="ruby-identifier">partial</span> = <span class="ruby-identifier">partial</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/.*<table>.*?<tr>.*?<\/tr>(.*?)<\/table>/i</span><span class="ruby-identifier">m</span>)[<span class="ruby-value">1</span>]
|
||||
21: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Partial '#{name}' doesn't contain any table"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">partial</span>
|
||||
22: <span class="ruby-identifier">partial</span>
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000080" class="method-detail">
|
||||
<a name="M000080"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000080" class="method-signature">
|
||||
<span class="method-name">render_partial</span><span class="method-args">(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Overrides where the partial is searched for, and returns only the command
|
||||
table rows.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000080-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/partials_support.rb, line 9</span>
|
||||
9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_partial</span> <span class="ruby-identifier">partial_path</span> = <span class="ruby-identifier">default_template_name</span>, <span class="ruby-identifier">object</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">local_assigns</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">status</span> = <span class="ruby-keyword kw">nil</span>
|
||||
10: <span class="ruby-identifier">pattern</span> = <span class="ruby-identifier">partial_pattern</span> <span class="ruby-identifier">partial_path</span>
|
||||
11: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-identifier">pattern</span>].<span class="ruby-identifier">first</span>
|
||||
12: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Partial '#{partial_path}' cannot be found! (Looking for file: '#{pattern}')"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filename</span>
|
||||
13: <span class="ruby-identifier">partial</span> = <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">:use_full_path</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">local_assigns</span>
|
||||
14: <span class="ruby-identifier">extract_commands_from_partial</span> <span class="ruby-identifier">partial</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::PartialsSupport</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::PartialsSupport</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/partials_support_rb.html">
|
||||
lib/selenium_on_rails/partials_support.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Provides partials support to test cases so they can include other partial
|
||||
test cases.
|
||||
</p>
|
||||
<p>
|
||||
The partial‘s commands are returned as html table rows.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000142">extract_commands_from_partial</a>
|
||||
<a href="#M000141">render_partial</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000142" class="method-detail">
|
||||
<a name="M000142"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000142" class="method-signature">
|
||||
<span class="method-name">extract_commands_from_partial</span><span class="method-args">(partial)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Extracts the commands from a partial. The partial must contain a html table
|
||||
and the first row is ignored since it cannot contain a command.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000142-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/partials_support.rb, line 19</span>
|
||||
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_commands_from_partial</span> <span class="ruby-identifier">partial</span>
|
||||
20: <span class="ruby-identifier">partial</span> = <span class="ruby-identifier">partial</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/.*<table>.*?<tr>.*?<\/tr>(.*?)<\/table>/i</span><span class="ruby-identifier">m</span>)[<span class="ruby-value">1</span>]
|
||||
21: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Partial '#{name}' doesn't contain any table"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">partial</span>
|
||||
22: <span class="ruby-identifier">partial</span>
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000141" class="method-detail">
|
||||
<a name="M000141"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000141" class="method-signature">
|
||||
<span class="method-name">render_partial</span><span class="method-args">(partial_path = default_template_name, object = nil, local_assigns = nil, status = nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Overrides where the partial is searched for, and returns only the command
|
||||
table rows.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000141-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/partials_support.rb, line 9</span>
|
||||
9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_partial</span> <span class="ruby-identifier">partial_path</span> = <span class="ruby-identifier">default_template_name</span>, <span class="ruby-identifier">object</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">local_assigns</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">status</span> = <span class="ruby-keyword kw">nil</span>
|
||||
10: <span class="ruby-identifier">pattern</span> = <span class="ruby-identifier">partial_pattern</span> <span class="ruby-identifier">partial_path</span>
|
||||
11: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-identifier">pattern</span>].<span class="ruby-identifier">first</span>
|
||||
12: <span class="ruby-identifier">raise</span> <span class="ruby-node">"Partial '#{partial_path}' cannot be found! (Looking for file: '#{pattern}')"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">filename</span>
|
||||
13: <span class="ruby-identifier">partial</span> = <span class="ruby-identifier">render</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">:use_full_path</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:locals</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">local_assigns</span>
|
||||
14: <span class="ruby-identifier">extract_commands_from_partial</span> <span class="ruby-identifier">partial</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,295 +1,295 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::Paths</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Paths</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/paths_rb.html">
|
||||
lib/selenium_on_rails/paths.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000042">fixtures_path</a>
|
||||
<a href="#M000041">layout_path</a>
|
||||
<a href="#M000043">log_path</a>
|
||||
<a href="#M000038">selenium_path</a>
|
||||
<a href="#M000039">selenium_tests_path</a>
|
||||
<a href="#M000044">skip_file?</a>
|
||||
<a href="#M000040">view_path</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000042" class="method-detail">
|
||||
<a name="M000042"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000042" class="method-signature">
|
||||
<span class="method-name">fixtures_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000042-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 25</span>
|
||||
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fixtures_path</span>
|
||||
26: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'test/fixtures'</span>)
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000041" class="method-detail">
|
||||
<a name="M000041"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000041" class="method-signature">
|
||||
<span class="method-name">layout_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Returns the path to the layout template. The path is relative in relation
|
||||
to the app/views/ directory since Rails doesn’t support absolute
|
||||
paths to layout templates.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000041-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 19</span>
|
||||
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout_path</span>
|
||||
20: <span class="ruby-identifier">rails_root</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'app/views'</span>))
|
||||
21: <span class="ruby-identifier">view_path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'layout'</span>)
|
||||
22: <span class="ruby-identifier">view_path</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">rails_root</span>).<span class="ruby-identifier">to_s</span>
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000043" class="method-detail">
|
||||
<a name="M000043"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000043" class="method-signature">
|
||||
<span class="method-name">log_path</span><span class="method-args">(log_file)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000043-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 29</span>
|
||||
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_path</span> <span class="ruby-identifier">log_file</span>
|
||||
30: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/../../log/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">log_file</span>)
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000038" class="method-detail">
|
||||
<a name="M000038"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000038" class="method-signature">
|
||||
<span class="method-name">selenium_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000038-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 3</span>
|
||||
3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">selenium_path</span>
|
||||
4: <span class="ruby-ivar">@@selenium_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">find_selenium_path</span>
|
||||
5: <span class="ruby-ivar">@@selenium_path</span>
|
||||
6: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000039" class="method-detail">
|
||||
<a name="M000039"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000039" class="method-signature">
|
||||
<span class="method-name">selenium_tests_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000039-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 8</span>
|
||||
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">selenium_tests_path</span>
|
||||
9: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'test/selenium'</span>))
|
||||
10: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000044" class="method-detail">
|
||||
<a name="M000044"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000044" class="method-signature">
|
||||
<span class="method-name">skip_file?</span><span class="method-args">(file)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000044-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 33</span>
|
||||
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_file?</span> <span class="ruby-identifier">file</span>
|
||||
34: <span class="ruby-identifier">file</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
35: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'CVS'</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-value str">'.'</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">ends_with?</span>(<span class="ruby-value str">'~'</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-value str">'_'</span>)
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37: <span class="ruby-keyword kw">false</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000040" class="method-detail">
|
||||
<a name="M000040"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000040" class="method-signature">
|
||||
<span class="method-name">view_path</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000040-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 12</span>
|
||||
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">view_path</span> <span class="ruby-identifier">view</span>
|
||||
13: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/../views/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">view</span>)
|
||||
14: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::Paths</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Paths</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/paths_rb.html">
|
||||
lib/selenium_on_rails/paths.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000076">fixtures_path</a>
|
||||
<a href="#M000075">layout_path</a>
|
||||
<a href="#M000077">log_path</a>
|
||||
<a href="#M000072">selenium_path</a>
|
||||
<a href="#M000073">selenium_tests_path</a>
|
||||
<a href="#M000078">skip_file?</a>
|
||||
<a href="#M000074">view_path</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000076" class="method-detail">
|
||||
<a name="M000076"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000076" class="method-signature">
|
||||
<span class="method-name">fixtures_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000076-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 25</span>
|
||||
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fixtures_path</span>
|
||||
26: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'test/fixtures'</span>)
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000075" class="method-detail">
|
||||
<a name="M000075"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000075" class="method-signature">
|
||||
<span class="method-name">layout_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Returns the path to the layout template. The path is relative in relation
|
||||
to the app/views/ directory since Rails doesn‘t support absolute
|
||||
paths to layout templates.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000075-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 19</span>
|
||||
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">layout_path</span>
|
||||
20: <span class="ruby-identifier">rails_root</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'app/views'</span>))
|
||||
21: <span class="ruby-identifier">view_path</span> = <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">view_path</span>(<span class="ruby-value str">'layout'</span>)
|
||||
22: <span class="ruby-identifier">view_path</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">rails_root</span>).<span class="ruby-identifier">to_s</span>
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000077" class="method-detail">
|
||||
<a name="M000077"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000077" class="method-signature">
|
||||
<span class="method-name">log_path</span><span class="method-args">(log_file)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000077-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 29</span>
|
||||
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_path</span> <span class="ruby-identifier">log_file</span>
|
||||
30: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/../../log/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">log_file</span>))
|
||||
31: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000072" class="method-detail">
|
||||
<a name="M000072"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000072" class="method-signature">
|
||||
<span class="method-name">selenium_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000072-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 3</span>
|
||||
3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">selenium_path</span>
|
||||
4: <span class="ruby-ivar">@@selenium_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">find_selenium_path</span>
|
||||
5: <span class="ruby-ivar">@@selenium_path</span>
|
||||
6: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000073" class="method-detail">
|
||||
<a name="M000073"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000073" class="method-signature">
|
||||
<span class="method-name">selenium_tests_path</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000073-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 8</span>
|
||||
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">selenium_tests_path</span>
|
||||
9: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'test/selenium'</span>))
|
||||
10: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000078" class="method-detail">
|
||||
<a name="M000078"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000078" class="method-signature">
|
||||
<span class="method-name">skip_file?</span><span class="method-args">(file)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000078-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 33</span>
|
||||
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skip_file?</span> <span class="ruby-identifier">file</span>
|
||||
34: <span class="ruby-identifier">file</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
||||
35: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'CVS'</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-value str">'.'</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">ends_with?</span>(<span class="ruby-value str">'~'</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">starts_with?</span>(<span class="ruby-value str">'_'</span>)
|
||||
36: <span class="ruby-keyword kw">end</span>
|
||||
37: <span class="ruby-keyword kw">false</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000074" class="method-detail">
|
||||
<a name="M000074"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000074" class="method-signature">
|
||||
<span class="method-name">view_path</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000074-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/paths.rb, line 12</span>
|
||||
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">view_path</span> <span class="ruby-identifier">view</span>
|
||||
13: <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'/../views/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">view</span>)
|
||||
14: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,219 +1,219 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::RSelenese</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::RSelenese</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/rselenese_rb.html">
|
||||
lib/selenium_on_rails/rselenese.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="TestBuilder.html">
|
||||
SeleniumOnRails::TestBuilder
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Renders Selenium test templates in a fashion analogous to <tt>rxml</tt> and
|
||||
<tt>rjs</tt> templates.
|
||||
</p>
|
||||
<pre>
|
||||
setup
|
||||
open :controller => 'customer', :action => 'list'
|
||||
assert_title 'Customers'
|
||||
</pre>
|
||||
<p>
|
||||
See <a href="TestBuilder.html">SeleniumOnRails::TestBuilder</a> for a list
|
||||
of available commands.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000084">new</a>
|
||||
<a href="#M000085">render</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">view</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000084" class="method-detail">
|
||||
<a name="M000084"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000084" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a new <a href="RSelenese.html">RSelenese</a> renderer bound to
|
||||
<em>view</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000084-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/rselenese.rb, line 17</span>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::RSelenese</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::RSelenese</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/rselenese_rb.html">
|
||||
lib/selenium_on_rails/rselenese.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
<a href="TestBuilder.html">
|
||||
SeleniumOnRails::TestBuilder
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Renders Selenium test templates in a fashion analogous to <tt>rxml</tt> and
|
||||
<tt>rjs</tt> templates.
|
||||
</p>
|
||||
<pre>
|
||||
setup
|
||||
open :controller => 'customer', :action => 'list'
|
||||
assert_title 'Customers'
|
||||
</pre>
|
||||
<p>
|
||||
See <a href="TestBuilder.html">SeleniumOnRails::TestBuilder</a> for a list
|
||||
of available commands.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000145">new</a>
|
||||
<a href="#M000146">render</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">view</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000145" class="method-detail">
|
||||
<a name="M000145"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000145" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a <a href="RSelenese.html#M000145">new</a> <a
|
||||
href="RSelenese.html">RSelenese</a> renderer bound to <em>view</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000145-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/rselenese.rb, line 17</span>
|
||||
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">view</span>
|
||||
18: <span class="ruby-keyword kw">super</span> <span class="ruby-identifier">view</span>
|
||||
19: <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000085" class="method-detail">
|
||||
<a name="M000085"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000085" class="method-signature">
|
||||
<span class="method-name">render</span><span class="method-args">(template, local_assigns)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Render <em>template</em> using <em>local_assigns</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000085-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/rselenese.rb, line 23</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000146" class="method-detail">
|
||||
<a name="M000146"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000146" class="method-signature">
|
||||
<span class="method-name">render</span><span class="method-args">(template, local_assigns)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Render <em>template</em> using <em>local_assigns</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000146-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/rselenese.rb, line 23</span>
|
||||
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">template</span>, <span class="ruby-identifier">local_assigns</span>
|
||||
24: <span class="ruby-identifier">title</span> = (<span class="ruby-ivar">@view</span>.<span class="ruby-identifier">assigns</span>[<span class="ruby-value str">'page_title'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">local_assigns</span>[<span class="ruby-value str">'page_title'</span>])
|
||||
25: <span class="ruby-identifier">table</span>(<span class="ruby-identifier">title</span>) <span class="ruby-keyword kw">do</span>
|
||||
26: <span class="ruby-identifier">test</span> = <span class="ruby-keyword kw">self</span> <span class="ruby-comment cmt">#to enable test.command</span>
|
||||
26: <span class="ruby-identifier">test</span> = <span class="ruby-keyword kw">self</span> <span class="ruby-comment cmt">#to enable test.command
</span>
|
||||
27:
|
||||
28: <span class="ruby-identifier">assign_locals_code</span> = <span class="ruby-value str">''</span>
|
||||
29: <span class="ruby-identifier">local_assigns</span>.<span class="ruby-identifier">each_key</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">assign_locals_code</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{key} = local_assigns[#{key.inspect}];"</span>}
|
||||
30:
|
||||
31: <span class="ruby-identifier">eval</span> <span class="ruby-identifier">assign_locals_code</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">template</span>
|
||||
32: <span class="ruby-keyword kw">end</span>
|
||||
33: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
33: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,156 +1,156 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::Renderer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Renderer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/renderer_rb.html">
|
||||
lib/selenium_on_rails/renderer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000037">render_test_case</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
<span class="include-name"><a href="../SeleniumHelper.html">SeleniumHelper</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000037" class="method-detail">
|
||||
<a name="M000037"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000037" class="method-signature">
|
||||
<span class="method-name">render_test_case</span><span class="method-args">(filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000037-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/renderer.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_test_case</span> <span class="ruby-identifier">filename</span>
|
||||
6: <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">SeleniumOnRails</span><span class="ruby-operator">::</span><span class="ruby-constant">PartialsSupport</span>
|
||||
7: <span class="ruby-ivar">@page_title</span> = <span class="ruby-identifier">test_case_name</span> <span class="ruby-identifier">filename</span>
|
||||
8: <span class="ruby-identifier">output</span> = <span class="ruby-identifier">render_to_string</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filename</span>
|
||||
9: <span class="ruby-identifier">layout</span> = (<span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/<html>/i</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">false</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">layout_path</span>)
|
||||
10: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">output</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout</span>
|
||||
11:
|
||||
12: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Cache-control'</span>] = <span class="ruby-value str">'no-cache'</span>
|
||||
13: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Pragma'</span>] = <span class="ruby-value str">'no-cache'</span>
|
||||
14: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Expires'</span>] = <span class="ruby-value str">'-1'</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::Renderer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Renderer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/renderer_rb.html">
|
||||
lib/selenium_on_rails/renderer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000071">render_test_case</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="Paths.html">SeleniumOnRails::Paths</a></span>
|
||||
<span class="include-name"><a href="../SeleniumHelper.html">SeleniumHelper</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000071" class="method-detail">
|
||||
<a name="M000071"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000071" class="method-signature">
|
||||
<span class="method-name">render_test_case</span><span class="method-args">(filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000071-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/renderer.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_test_case</span> <span class="ruby-identifier">filename</span>
|
||||
6: <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">SeleniumOnRails</span><span class="ruby-operator">::</span><span class="ruby-constant">PartialsSupport</span>
|
||||
7: <span class="ruby-ivar">@page_title</span> = <span class="ruby-identifier">test_case_name</span> <span class="ruby-identifier">filename</span>
|
||||
8: <span class="ruby-identifier">output</span> = <span class="ruby-identifier">render_to_string</span> <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filename</span>
|
||||
9: <span class="ruby-identifier">layout</span> = (<span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/<html>/i</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">false</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">layout_path</span>)
|
||||
10: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">output</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">layout</span>
|
||||
11:
|
||||
12: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Cache-control'</span>] = <span class="ruby-value str">'no-cache'</span>
|
||||
13: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Pragma'</span>] = <span class="ruby-value str">'no-cache'</span>
|
||||
14: <span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Expires'</span>] = <span class="ruby-value str">'-1'</span>
|
||||
15: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,179 +1,179 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::Selenese</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Selenese</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/selenese_rb.html">
|
||||
lib/selenium_on_rails/selenese.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000082">new</a>
|
||||
<a href="#M000083">render</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000082" class="method-detail">
|
||||
<a name="M000082"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000082" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000082-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/selenese.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">view</span>
|
||||
8: <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
|
||||
9: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000083" class="method-detail">
|
||||
<a name="M000083"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000083" class="method-signature">
|
||||
<span class="method-name">render</span><span class="method-args">(template, local_assigns)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000083-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/selenese.rb, line 11</span>
|
||||
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">template</span>, <span class="ruby-identifier">local_assigns</span>
|
||||
12: <span class="ruby-identifier">name</span> = (<span class="ruby-ivar">@view</span>.<span class="ruby-identifier">assigns</span>[<span class="ruby-value str">'page_title'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">local_assigns</span>[<span class="ruby-value str">'page_title'</span>])
|
||||
13: <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">template</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">split</span> <span class="ruby-value str">"\n"</span>
|
||||
14: <span class="ruby-identifier">html</span> = <span class="ruby-value str">''</span>
|
||||
15: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_comments</span>(<span class="ruby-identifier">lines</span>)
|
||||
16: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_commands</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">name</span>)
|
||||
17: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_comments</span>(<span class="ruby-identifier">lines</span>)
|
||||
18: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'You cannot have comments in the middle of commands!'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">next_line</span> <span class="ruby-identifier">lines</span>, <span class="ruby-identifier">:any</span>
|
||||
19: <span class="ruby-identifier">html</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::Selenese</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::Selenese</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/selenese_rb.html">
|
||||
lib/selenium_on_rails/selenese.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000143">new</a>
|
||||
<a href="#M000144">render</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000143" class="method-detail">
|
||||
<a name="M000143"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000143" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000143-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/selenese.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">view</span>
|
||||
8: <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
|
||||
9: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000144" class="method-detail">
|
||||
<a name="M000144"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000144" class="method-signature">
|
||||
<span class="method-name">render</span><span class="method-args">(template, local_assigns)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000144-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/selenese.rb, line 11</span>
|
||||
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span> <span class="ruby-identifier">template</span>, <span class="ruby-identifier">local_assigns</span>
|
||||
12: <span class="ruby-identifier">name</span> = (<span class="ruby-ivar">@view</span>.<span class="ruby-identifier">assigns</span>[<span class="ruby-value str">'page_title'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">local_assigns</span>[<span class="ruby-value str">'page_title'</span>])
|
||||
13: <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">template</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">split</span> <span class="ruby-value str">"\n"</span>
|
||||
14: <span class="ruby-identifier">html</span> = <span class="ruby-value str">''</span>
|
||||
15: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_comments</span>(<span class="ruby-identifier">lines</span>)
|
||||
16: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_commands</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">name</span>)
|
||||
17: <span class="ruby-identifier">html</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">extract_comments</span>(<span class="ruby-identifier">lines</span>)
|
||||
18: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'You cannot have comments in the middle of commands!'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">next_line</span> <span class="ruby-identifier">lines</span>, <span class="ruby-identifier">:any</span>
|
||||
19: <span class="ruby-identifier">html</span>
|
||||
20: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,223 +1,223 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::SuiteRenderer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::SuiteRenderer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/suite_renderer_rb.html">
|
||||
lib/selenium_on_rails/suite_renderer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000048">link_to_test_case</a>
|
||||
<a href="#M000047">test_cases</a>
|
||||
<a href="#M000045">test_suite_name</a>
|
||||
<a href="#M000046">test_suites</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000048" class="method-detail">
|
||||
<a name="M000048"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000048" class="method-signature">
|
||||
<span class="method-name">link_to_test_case</span><span class="method-args">(suite_name, filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000048-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 24</span>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::SuiteRenderer</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::SuiteRenderer</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/suite_renderer_rb.html">
|
||||
lib/selenium_on_rails/suite_renderer.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000082">link_to_test_case</a>
|
||||
<a href="#M000081">test_cases</a>
|
||||
<a href="#M000079">test_suite_name</a>
|
||||
<a href="#M000080">test_suites</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000082" class="method-detail">
|
||||
<a name="M000082"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000082" class="method-signature">
|
||||
<span class="method-name">link_to_test_case</span><span class="method-args">(suite_name, filename)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000082-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 24</span>
|
||||
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link_to_test_case</span> <span class="ruby-identifier">suite_name</span>, <span class="ruby-identifier">filename</span>
|
||||
25: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">suite_name</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">test_case_name</span>(<span class="ruby-identifier">filename</span>)
|
||||
26: <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:test_file</span>, <span class="ruby-identifier">:testname</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">path_to_relative_url</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/^\//</span>,<span class="ruby-value str">''</span>)
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000047" class="method-detail">
|
||||
<a name="M000047"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000047" class="method-signature">
|
||||
<span class="method-name">test_cases</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000047-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 18</span>
|
||||
27: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000081" class="method-detail">
|
||||
<a name="M000081"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000081" class="method-signature">
|
||||
<span class="method-name">test_cases</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000081-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 18</span>
|
||||
18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_cases</span> <span class="ruby-identifier">path</span>
|
||||
19: <span class="ruby-identifier">tests</span> = []
|
||||
20: <span class="ruby-identifier">visit_all_tests</span> <span class="ruby-identifier">path</span>, <span class="ruby-value str">''</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tests</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">n</span>,<span class="ruby-identifier">p</span>]}
|
||||
21: <span class="ruby-identifier">tests</span>
|
||||
22: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000045" class="method-detail">
|
||||
<a name="M000045"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000045" class="method-signature">
|
||||
<span class="method-name">test_suite_name</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000045-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 2</span>
|
||||
22: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000079" class="method-detail">
|
||||
<a name="M000079"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000079" class="method-signature">
|
||||
<span class="method-name">test_suite_name</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000079-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 2</span>
|
||||
2: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_suite_name</span> <span class="ruby-identifier">path</span>
|
||||
3: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'All test cases'</span> <span class="ruby-keyword kw">if</span> [<span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'/'</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">path_to_relative_url</span>(<span class="ruby-identifier">path</span>)
|
||||
4: <span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">path</span>)[<span class="ruby-value">-1</span>].<span class="ruby-identifier">humanize</span>
|
||||
5: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000046" class="method-detail">
|
||||
<a name="M000046"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000046" class="method-signature">
|
||||
<span class="method-name">test_suites</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000046-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 7</span>
|
||||
5: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000080" class="method-detail">
|
||||
<a name="M000080"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000080" class="method-signature">
|
||||
<span class="method-name">test_suites</span><span class="method-args">(path)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000080-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/suite_renderer.rb, line 7</span>
|
||||
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_suites</span> <span class="ruby-identifier">path</span>
|
||||
8: <span class="ruby-identifier">suites</span> = []
|
||||
9:
|
||||
10: <span class="ruby-identifier">parent_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>)) <span class="ruby-comment cmt">#all but last</span>
|
||||
10: <span class="ruby-identifier">parent_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-2</span>)) <span class="ruby-comment cmt">#all but last
</span>
|
||||
11: <span class="ruby-identifier">parent_path</span> = <span class="ruby-identifier">path_to_relative_url</span> <span class="ruby-identifier">parent_path</span>
|
||||
12: <span class="ruby-identifier">suites</span> <span class="ruby-operator"><<</span> [<span class="ruby-value str">'..'</span>, <span class="ruby-identifier">parent_path</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">parent_path</span>.<span class="ruby-identifier">nil?</span>
|
||||
13:
|
||||
14: <span class="ruby-identifier">visit_all_tests</span> <span class="ruby-identifier">path</span>, <span class="ruby-value str">''</span>, <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span>, <span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">suites</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">n</span>,<span class="ruby-identifier">path_to_relative_url</span>(<span class="ruby-identifier">p</span>)]}, <span class="ruby-keyword kw">nil</span>
|
||||
15: <span class="ruby-identifier">suites</span>
|
||||
16: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
16: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,372 +1,441 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::TestBuilder</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::TestBuilder</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/test_builder_rb.html">
|
||||
lib/selenium_on_rails/test_builder.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Builds Selenium test table using a high-level Ruby interface. Normally
|
||||
invoked through <a href="RSelenese.html">SeleniumOnRails::RSelenese</a>.
|
||||
</p>
|
||||
<p>
|
||||
See <a
|
||||
href="TestBuilderActions.html">SeleniumOnRails::TestBuilderActions</a> for
|
||||
the available actions and <a
|
||||
href="TestBuilderAccessors.html">SeleniumOnRails::TestBuilderAccessors</a>
|
||||
for the available checks.
|
||||
</p>
|
||||
<p>
|
||||
For more information on the commands supported by <a
|
||||
href="TestBuilder.html">TestBuilder</a>, see the Selenium Commands
|
||||
Documentation at <a
|
||||
href="http://release.openqa.org/selenium-core/nightly/reference.html">release.openqa.org/selenium-core/nightly/reference.html</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000090">command</a>
|
||||
<a href="#M000092">command_and_wait</a>
|
||||
<a href="#M000091">command_verbatim</a>
|
||||
<a href="#M000087">exactize</a>
|
||||
<a href="#M000093">make_command_waiting</a>
|
||||
<a href="#M000088">new</a>
|
||||
<a href="#M000086">selenize</a>
|
||||
<a href="#M000089">table</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="TestBuilderActions.html">SeleniumOnRails::TestBuilderActions</a></span>
|
||||
<span class="include-name"><a href="TestBuilderAccessors.html">SeleniumOnRails::TestBuilderAccessors</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000088" class="method-detail">
|
||||
<a name="M000088"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000088" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a new <a href="TestBuilder.html">TestBuilder</a> for <em>view</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000088-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 26</span>
|
||||
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">view</span>
|
||||
27: <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
|
||||
28: <span class="ruby-ivar">@output</span> = <span class="ruby-value str">''</span>
|
||||
29: <span class="ruby-ivar">@xml</span> = <span class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlMarkup</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">:indent</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, <span class="ruby-identifier">:target</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@output</span>
|
||||
30: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000086" class="method-detail">
|
||||
<a name="M000086"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000086" class="method-signature">
|
||||
<span class="method-name">selenize</span><span class="method-args">(str)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert <em>str</em> to a Selenium command name.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000086-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 15</span>
|
||||
15: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">selenize</span> <span class="ruby-identifier">str</span>
|
||||
16: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">camelize</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^[A-Z]/</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">downcase</span> }
|
||||
17: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000090" class="method-detail">
|
||||
<a name="M000090"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000090" class="method-signature">
|
||||
<span class="method-name">command</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Add a new test command using <em>cmd</em>, <em>target</em> and
|
||||
<em>value</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000090-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 41</span>
|
||||
41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">command</span> <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">target</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>
|
||||
42: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">tr</span> <span class="ruby-keyword kw">do</span>
|
||||
43: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">cmd</span>
|
||||
44: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">target</span>
|
||||
45: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">value</span>
|
||||
46: <span class="ruby-keyword kw">end</span>
|
||||
47: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000092" class="method-detail">
|
||||
<a name="M000092"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000092" class="method-signature">
|
||||
<span class="method-name">command_and_wait</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Same as <em>command</em> but add <em>AndWait</em> to the name of
|
||||
<em>cmd</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000092-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 52</span>
|
||||
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">command_and_wait</span> <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">target</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>
|
||||
53: <span class="ruby-identifier">command_verbatim</span> <span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'AndWait'</span>, <span class="ruby-identifier">target</span>, <span class="ruby-identifier">value</span>
|
||||
54: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000091" class="method-detail">
|
||||
<a name="M000091"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">command_verbatim</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Alias for <a href="TestBuilder.html#M000090">command</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000087" class="method-detail">
|
||||
<a name="M000087"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000087" class="method-signature">
|
||||
<span class="method-name">exactize</span><span class="method-args">(pattern)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Prepends <em>pattern</em> with ‘exact:’ if it would be
|
||||
considered containing string-match pattern otherwise.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000087-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 21</span>
|
||||
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exactize</span> <span class="ruby-identifier">pattern</span>
|
||||
22: <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">':'</span>) <span class="ruby-operator">?</span> <span class="ruby-node">"exact:#{pattern}"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">pattern</span>
|
||||
23: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000093" class="method-detail">
|
||||
<a name="M000093"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000093" class="method-signature">
|
||||
<span class="method-name">make_command_waiting</span><span class="method-args">() {|| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Re routes commands in the provided block to <a
|
||||
href="TestBuilder.html#M000092">command_and_wait</a> instead of <a
|
||||
href="TestBuilder.html#M000090">command</a>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000093-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 58</span>
|
||||
58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_command_waiting</span>
|
||||
59: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:alias_method</span>, <span class="ruby-identifier">:command</span>, <span class="ruby-identifier">:command_and_wait</span>
|
||||
60: <span class="ruby-keyword kw">yield</span>
|
||||
61: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:alias_method</span>, <span class="ruby-identifier">:command</span>, <span class="ruby-identifier">:command_verbatim</span>
|
||||
62: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000089" class="method-detail">
|
||||
<a name="M000089"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000089" class="method-signature">
|
||||
<span class="method-name">table</span><span class="method-args">(title) {|self| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Add a new table of tests, and return the HTML.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000089-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 33</span>
|
||||
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">table</span> <span class="ruby-identifier">title</span>
|
||||
34: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">table</span> <span class="ruby-keyword kw">do</span>
|
||||
35: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">tr</span> <span class="ruby-keyword kw">do</span> <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">th</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">:colspan</span> =<span class="ruby-operator">></span> <span class="ruby-value">3</span>) <span class="ruby-keyword kw">end</span>
|
||||
36: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span>
|
||||
37: <span class="ruby-keyword kw">end</span>
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRails::TestBuilder</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::TestBuilder</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/test_builder_rb.html">
|
||||
lib/selenium_on_rails/test_builder.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Builds Selenium test <a href="TestBuilder.html#M000150">table</a> using a
|
||||
high-level Ruby interface. Normally invoked through <a
|
||||
href="RSelenese.html">SeleniumOnRails::RSelenese</a>.
|
||||
</p>
|
||||
<p>
|
||||
See <a
|
||||
href="TestBuilderActions.html">SeleniumOnRails::TestBuilderActions</a> for
|
||||
the available actions and <a
|
||||
href="TestBuilderAccessors.html">SeleniumOnRails::TestBuilderAccessors</a>
|
||||
for the available checks.
|
||||
</p>
|
||||
<p>
|
||||
For more information on the commands supported by <a
|
||||
href="TestBuilder.html">TestBuilder</a>, see the Selenium Commands
|
||||
Documentation at <a
|
||||
href="http://release.openqa.org/selenium-core/nightly/reference.html">release.openqa.org/selenium-core/nightly/reference.html</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000156">collection_arg</a>
|
||||
<a href="#M000151">command</a>
|
||||
<a href="#M000153">command_and_wait</a>
|
||||
<a href="#M000152">command_verbatim</a>
|
||||
<a href="#M000148">exactize</a>
|
||||
<a href="#M000154">make_command_waiting</a>
|
||||
<a href="#M000149">new</a>
|
||||
<a href="#M000147">selenize</a>
|
||||
<a href="#M000150">table</a>
|
||||
<a href="#M000155">url_arg</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
<div id="includes">
|
||||
<h3 class="section-bar">Included Modules</h3>
|
||||
|
||||
<div id="includes-list">
|
||||
<span class="include-name"><a href="TestBuilderActions.html">SeleniumOnRails::TestBuilderActions</a></span>
|
||||
<span class="include-name"><a href="TestBuilderAccessors.html">SeleniumOnRails::TestBuilderAccessors</a></span>
|
||||
<span class="include-name"><a href="TestBuilderUserActions.html">SeleniumOnRails::TestBuilderUserActions</a></span>
|
||||
<span class="include-name"><a href="TestBuilderUserAccessors.html">SeleniumOnRails::TestBuilderUserAccessors</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000149" class="method-detail">
|
||||
<a name="M000149"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000149" class="method-signature">
|
||||
<span class="method-name">new</span><span class="method-args">(view)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a <a href="TestBuilder.html#M000149">new</a> <a
|
||||
href="TestBuilder.html">TestBuilder</a> for <em>view</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000149-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 47</span>
|
||||
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">view</span>
|
||||
48: <span class="ruby-ivar">@view</span> = <span class="ruby-identifier">view</span>
|
||||
49: <span class="ruby-ivar">@output</span> = <span class="ruby-value str">''</span>
|
||||
50: <span class="ruby-ivar">@xml</span> = <span class="ruby-constant">Builder</span><span class="ruby-operator">::</span><span class="ruby-constant">XmlMarkup</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">:indent</span> =<span class="ruby-operator">></span> <span class="ruby-value">2</span>, <span class="ruby-identifier">:target</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@output</span>
|
||||
51: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000147" class="method-detail">
|
||||
<a name="M000147"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000147" class="method-signature">
|
||||
<span class="method-name">selenize</span><span class="method-args">(str)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Convert <em>str</em> to a Selenium <a
|
||||
href="TestBuilder.html#M000151">command</a> name.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000147-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 36</span>
|
||||
36: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">selenize</span> <span class="ruby-identifier">str</span>
|
||||
37: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">camelize</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^[A-Z]/</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">downcase</span> }
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000151" class="method-detail">
|
||||
<a name="M000151"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000151" class="method-signature">
|
||||
<span class="method-name">command</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Add a <a href="TestBuilder.html#M000149">new</a> test <a
|
||||
href="TestBuilder.html#M000151">command</a> using <em>cmd</em>,
|
||||
<em>target</em> and <em>value</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000151-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 62</span>
|
||||
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">command</span> <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">target</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>
|
||||
63: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">tr</span> <span class="ruby-keyword kw">do</span>
|
||||
64: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">cmd</span>
|
||||
65: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">target</span>
|
||||
66: <span class="ruby-identifier">_tdata</span> <span class="ruby-identifier">value</span>
|
||||
67: <span class="ruby-keyword kw">end</span>
|
||||
68: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000153" class="method-detail">
|
||||
<a name="M000153"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000153" class="method-signature">
|
||||
<span class="method-name">command_and_wait</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Same as <em><a href="TestBuilder.html#M000151">command</a></em> but add
|
||||
<em>AndWait</em> to the name of <em>cmd</em>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000153-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 73</span>
|
||||
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">command_and_wait</span> <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">target</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>
|
||||
74: <span class="ruby-identifier">command_verbatim</span> <span class="ruby-identifier">cmd</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'AndWait'</span>, <span class="ruby-identifier">target</span>, <span class="ruby-identifier">value</span>
|
||||
75: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000152" class="method-detail">
|
||||
<a name="M000152"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">command_verbatim</span><span class="method-args">(cmd, target=nil, value=nil)</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Alias for <a href="TestBuilder.html#M000151">command</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000148" class="method-detail">
|
||||
<a name="M000148"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000148" class="method-signature">
|
||||
<span class="method-name">exactize</span><span class="method-args">(pattern)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Prepends <em>pattern</em> with ‘exact:’ if it would be
|
||||
considered containing string-match pattern otherwise.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000148-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 42</span>
|
||||
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exactize</span> <span class="ruby-identifier">pattern</span>
|
||||
43: <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">':'</span>) <span class="ruby-operator">?</span> <span class="ruby-node">"exact:#{pattern}"</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">pattern</span>
|
||||
44: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000154" class="method-detail">
|
||||
<a name="M000154"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000154" class="method-signature">
|
||||
<span class="method-name">make_command_waiting</span><span class="method-args">() {|| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Re routes commands in the provided block to <a
|
||||
href="TestBuilder.html#M000153">command_and_wait</a> instead of <a
|
||||
href="TestBuilder.html#M000151">command</a>.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000154-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 79</span>
|
||||
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_command_waiting</span>
|
||||
80: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:alias_method</span>, <span class="ruby-identifier">:command</span>, <span class="ruby-identifier">:command_and_wait</span>
|
||||
81: <span class="ruby-keyword kw">yield</span>
|
||||
82: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:alias_method</span>, <span class="ruby-identifier">:command</span>, <span class="ruby-identifier">:command_verbatim</span>
|
||||
83: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000150" class="method-detail">
|
||||
<a name="M000150"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000150" class="method-signature">
|
||||
<span class="method-name">table</span><span class="method-args">(title) {|self| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Add a <a href="TestBuilder.html#M000149">new</a> <a
|
||||
href="TestBuilder.html#M000150">table</a> of tests, and return the HTML.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000150-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 54</span>
|
||||
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">table</span> <span class="ruby-identifier">title</span>
|
||||
55: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">table</span> <span class="ruby-keyword kw">do</span>
|
||||
56: <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">tr</span> <span class="ruby-keyword kw">do</span> <span class="ruby-ivar">@xml</span>.<span class="ruby-identifier">th</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">:colspan</span> =<span class="ruby-operator">></span> <span class="ruby-value">3</span>) <span class="ruby-keyword kw">end</span>
|
||||
57: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span>
|
||||
58: <span class="ruby-keyword kw">end</span>
|
||||
59: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Protected Instance methods</h3>
|
||||
|
||||
<div id="method-M000156" class="method-detail">
|
||||
<a name="M000156"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000156" class="method-signature">
|
||||
<span class="method-name">collection_arg</span><span class="method-args">(arg)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
If <em>arg</em> is an array formats <em>arg</em> to a textual
|
||||
representation. Otherwise return unchanged.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000156-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 95</span>
|
||||
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collection_arg</span> <span class="ruby-identifier">arg</span>
|
||||
96: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
|
||||
97: <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[\\,]/</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-node">"\\#{s}"</span> } }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>)
|
||||
98: <span class="ruby-keyword kw">else</span>
|
||||
99: <span class="ruby-identifier">arg</span>
|
||||
100: <span class="ruby-keyword kw">end</span>
|
||||
101: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000155" class="method-detail">
|
||||
<a name="M000155"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000155" class="method-signature">
|
||||
<span class="method-name">url_arg</span><span class="method-args">(url)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
If <em>url</em> is a string, return unchanged. Otherwise, pass it to
|
||||
ActionView#UrlHelper#url_for.
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000155-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder.rb, line 89</span>
|
||||
89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_arg</span> <span class="ruby-identifier">url</span>
|
||||
90: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">String</span>) <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">url</span> <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">exactize</span>(<span class="ruby-ivar">@view</span>.<span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">url</span>)) <span class="ruby-keyword kw">end</span>
|
||||
91: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
116
vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html
vendored
Normal file
116
vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserAccessors.html
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::TestBuilderUserAccessors</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::TestBuilderUserAccessors</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/test_builder_rb.html">
|
||||
lib/selenium_on_rails/test_builder.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Create test_builder_user_accessors.rb to support accessors included in
|
||||
selenium-core‘s user-extensions.js
|
||||
</p>
|
||||
<p>
|
||||
See test_builder_user_accessors.rb.example for examples matching
|
||||
selenium-core‘s user-extensions.js.sample
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
116
vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html
vendored
Normal file
116
vendor/plugins/selenium-on-rails/doc/classes/SeleniumOnRails/TestBuilderUserActions.html
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SeleniumOnRails::TestBuilderUserActions</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRails::TestBuilderUserActions</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/selenium_on_rails/test_builder_rb.html">
|
||||
lib/selenium_on_rails/test_builder.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Create test_builder_user_actions.rb to support actions included in
|
||||
selenium-core‘s user-extensions.js
|
||||
</p>
|
||||
<p>
|
||||
See test_builder_user_actions.rb.example for examples matching
|
||||
selenium-core‘s user-extensions.js.sample
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,150 +1,150 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRailsConfig</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRailsConfig</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_on_rails_config_rb.html">
|
||||
lib/selenium_on_rails_config.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000007">get</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000007" class="method-signature">
|
||||
<span class="method-name">get</span><span class="method-args">(var, default = nil) {|if block_given?| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000007-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails_config.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">var</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword kw">nil</span>
|
||||
6: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">configs</span>[<span class="ruby-identifier">var</span>.<span class="ruby-identifier">to_s</span>]
|
||||
7: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@@defaults</span>[<span class="ruby-identifier">var</span>]
|
||||
8: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">default</span>
|
||||
9: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
10: <span class="ruby-identifier">value</span>
|
||||
11: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SeleniumOnRailsConfig</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SeleniumOnRailsConfig</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/selenium_on_rails_config_rb.html">
|
||||
lib/selenium_on_rails_config.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000007">get</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000007" class="method-signature">
|
||||
<span class="method-name">get</span><span class="method-args">(var, default = nil) {|if block_given?| ...}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000007-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/selenium_on_rails_config.rb, line 5</span>
|
||||
5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span> <span class="ruby-identifier">var</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword kw">nil</span>
|
||||
6: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">configs</span>[<span class="ruby-identifier">var</span>.<span class="ruby-identifier">to_s</span>]
|
||||
7: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@@defaults</span>[<span class="ruby-identifier">var</span>]
|
||||
8: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">default</span>
|
||||
9: <span class="ruby-identifier">value</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
||||
10: <span class="ruby-identifier">value</span>
|
||||
11: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue