mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
1672 lines
No EOL
55 KiB
HTML
1672 lines
No EOL
55 KiB
HTML
<?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::TestBuilderAccessors</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::TestBuilderAccessors</td>
|
|
</tr>
|
|
<tr class="top-aligned-row">
|
|
<td><strong>In:</strong></td>
|
|
<td>
|
|
<a href="../../files/lib/selenium_on_rails/test_builder_accessors_rb.html">
|
|
lib/selenium_on_rails/test_builder_accessors.rb
|
|
</a>
|
|
<br />
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<!-- banner header -->
|
|
|
|
<div id="bodyContent">
|
|
|
|
|
|
|
|
<div id="contextContent">
|
|
|
|
<div id="description">
|
|
<p>
|
|
The accessors available for <a
|
|
href="TestBuilder.html">SeleniumOnRails::TestBuilder</a> tests.
|
|
</p>
|
|
<p>
|
|
For each <tt>store_foo</tt> there’s <tt>assert_foo</tt>,
|
|
<tt>assert_not_foo</tt>, <tt>verify_foo</tt>, <tt>verify_not_foo</tt>,
|
|
<tt>wait_for_foo</tt>, <tt>wait_for_not_foo</tt>.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="method-list">
|
|
<h3 class="section-bar">Methods</h3>
|
|
|
|
<div class="name-list">
|
|
<a href="#M000058">store_absolute_location</a>
|
|
<a href="#M000055">store_alert</a>
|
|
<a href="#M000052">store_alert_present</a>
|
|
<a href="#M000075">store_all_buttons</a>
|
|
<a href="#M000077">store_all_fields</a>
|
|
<a href="#M000076">store_all_links</a>
|
|
<a href="#M000070">store_attribute</a>
|
|
<a href="#M000061">store_body_text</a>
|
|
<a href="#M000065">store_checked</a>
|
|
<a href="#M000056">store_confirmation</a>
|
|
<a href="#M000054">store_confirmation_present</a>
|
|
<a href="#M000074">store_editable</a>
|
|
<a href="#M000072">store_element_present</a>
|
|
<a href="#M000064">store_eval</a>
|
|
<a href="#M000079">store_expression</a>
|
|
<a href="#M000078">store_html_source</a>
|
|
<a href="#M000059">store_location</a>
|
|
<a href="#M000057">store_prompt</a>
|
|
<a href="#M000053">store_prompt_present</a>
|
|
<a href="#M000069">store_select_options</a>
|
|
<a href="#M000067">store_selected</a>
|
|
<a href="#M000068">store_selected_options</a>
|
|
<a href="#M000066">store_table</a>
|
|
<a href="#M000063">store_text</a>
|
|
<a href="#M000071">store_text_present</a>
|
|
<a href="#M000060">store_title</a>
|
|
<a href="#M000062">store_value</a>
|
|
<a href="#M000073">store_visible</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-M000058" class="method-detail">
|
|
<a name="M000058"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000058" class="method-signature">
|
|
<span class="method-name">store_absolute_location</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the absolute URL of the current page.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_absolute_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_absolute_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_absolute_location_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_absolute_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_absolute_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_absolute_location(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000058-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 129</span>
|
|
129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_absolute_location</span> <span class="ruby-identifier">variable_name</span>
|
|
130: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAbsoluteLocation'</span>, <span class="ruby-identifier">variable_name</span>
|
|
131: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000055" class="method-detail">
|
|
<a name="M000055"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000055" class="method-signature">
|
|
<span class="method-name">store_alert</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Retrieves the message of a JavaScript alert generated during the previous
|
|
action, or fail if there were no alerts.
|
|
</p>
|
|
<p>
|
|
Getting an alert has the same effect as manually clicking OK. If an alert
|
|
is generated but you do not get/verify it, the next Selenium action will
|
|
fail.
|
|
</p>
|
|
<p>
|
|
NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert
|
|
dialog.
|
|
</p>
|
|
<p>
|
|
NOTE: Selenium does NOT support JavaScript alerts that are generated in a
|
|
page’s <tt>onload()</tt> event handler. In this case a visible dialog
|
|
WILL be generated and Selenium will hang until someone manually clicks OK.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_alert(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_alert(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_alert_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_alert(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_alert(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_alert(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000055-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 66</span>
|
|
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_alert</span> <span class="ruby-identifier">variable_name</span>
|
|
67: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAlert'</span>, <span class="ruby-identifier">variable_name</span>
|
|
68: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000052" class="method-detail">
|
|
<a name="M000052"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000052" class="method-signature">
|
|
<span class="method-name">store_alert_present</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Has an alert occurred?
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_alert_present</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_alert_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_alert_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_alert_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_alert_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_alert_not_present</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000052-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 15</span>
|
|
15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_alert_present</span> <span class="ruby-identifier">variable_name</span>
|
|
16: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAlertPresent'</span>, <span class="ruby-identifier">variable_name</span>
|
|
17: <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">store_all_buttons</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Returns the IDs of all buttons on the page.
|
|
</p>
|
|
<p>
|
|
If a given button has no ID, it will appear as "" in this array.
|
|
</p>
|
|
<p>
|
|
The <tt>pattern</tt> for the automatically generated assertions can either
|
|
take an array or a pattern.
|
|
</p>
|
|
<pre>
|
|
assert_all_buttons ['but1', 'but2']
|
|
assert_all_buttons 'but?,but?*'
|
|
</pre>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_all_buttons(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 400</span>
|
|
400: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_all_buttons</span> <span class="ruby-identifier">variable_name</span>
|
|
401: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAllButtons'</span>, <span class="ruby-identifier">variable_name</span>
|
|
402: <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">store_all_fields</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Returns the IDs of all input fields on the page.
|
|
</p>
|
|
<p>
|
|
If a given field has no ID, it will appear as "" in this array.
|
|
</p>
|
|
<p>
|
|
The <tt>pattern</tt> for the automatically generated assertions can either
|
|
take an array or a pattern.
|
|
</p>
|
|
<pre>
|
|
assert_all_fields ['field1', 'field2']
|
|
assert_all_fields 'field?,field?*'
|
|
</pre>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_all_fields(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 440</span>
|
|
440: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_all_fields</span> <span class="ruby-identifier">variable_name</span>
|
|
441: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAllFields'</span>, <span class="ruby-identifier">variable_name</span>
|
|
442: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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">store_all_links</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Returns the IDs of all links on the page.
|
|
</p>
|
|
<p>
|
|
If a given link has no ID, it will appear as "" in this array.
|
|
</p>
|
|
<p>
|
|
The <tt>pattern</tt> for the automatically generated assertions can either
|
|
take an array or a pattern.
|
|
</p>
|
|
<pre>
|
|
assert_all_links ['link1', 'link2']
|
|
assert_all_links 'link?,link?*'
|
|
</pre>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_all_links(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 420</span>
|
|
420: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_all_links</span> <span class="ruby-identifier">variable_name</span>
|
|
421: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAllLinks'</span>, <span class="ruby-identifier">variable_name</span>
|
|
422: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000070" class="method-detail">
|
|
<a name="M000070"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000070" class="method-signature">
|
|
<span class="method-name">store_attribute</span><span class="method-args">(locator, attribute_name, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the value of an element attribute.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_attribute(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_attribute(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_attribute_present(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_attribute(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_attribute(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_attribute(locator, attribute_name, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000070-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 322</span>
|
|
322: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_attribute</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">attribute_name</span>, <span class="ruby-identifier">variable_name</span>
|
|
323: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeAttribute'</span>, <span class="ruby-node">"#{locator}@#{attribute_name}"</span>, <span class="ruby-identifier">variable_name</span>
|
|
324: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000061" class="method-detail">
|
|
<a name="M000061"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000061" class="method-signature">
|
|
<span class="method-name">store_body_text</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the entire text of the page.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_body_text(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_body_text(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_body_text_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_body_text(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_body_text(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_body_text(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000061-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 169</span>
|
|
169: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_body_text</span> <span class="ruby-identifier">variable_name</span>
|
|
170: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeBodyText'</span>, <span class="ruby-identifier">variable_name</span>
|
|
171: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000065" class="method-detail">
|
|
<a name="M000065"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000065" class="method-signature">
|
|
<span class="method-name">store_checked</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the
|
|
specified element doesn’t exist or isn’t a toggle-button.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_checked(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_checked(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_checked_present(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_checked(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_checked(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_checked(locator, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000065-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 239</span>
|
|
239: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_checked</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
240: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeChecked'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
241: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000056" class="method-detail">
|
|
<a name="M000056"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000056" class="method-signature">
|
|
<span class="method-name">store_confirmation</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Retrieves the message of a JavaScript confirmation dialog generated during
|
|
the previous action.
|
|
</p>
|
|
<p>
|
|
By default, the confirm function will return <tt>true</tt>, having the same
|
|
effect as manually clicking OK. This can be changed by prior execution of
|
|
the <tt>choose_cancel_on_next_confirmation</tt> command. If a confirmation
|
|
is generated but you do not get/verify it, the next Selenium action will
|
|
fail.
|
|
</p>
|
|
<p>
|
|
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
|
|
dialog.
|
|
</p>
|
|
<p>
|
|
NOTE: Selenium does NOT support JavaScript confirmations that are generated
|
|
in a page’s <tt>onload()</tt> event handler. In this case a visible
|
|
dialog WILL be generated and Selenium will hang until you manually click
|
|
OK.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_confirmation(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_confirmation(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_confirmation_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_confirmation(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_confirmation(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_confirmation(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000056-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 92</span>
|
|
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_confirmation</span> <span class="ruby-identifier">variable_name</span>
|
|
93: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeConfirmation'</span>, <span class="ruby-identifier">variable_name</span>
|
|
94: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000054" class="method-detail">
|
|
<a name="M000054"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000054" class="method-signature">
|
|
<span class="method-name">store_confirmation_present</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Has <tt>confirm()</tt> been called?
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_confirmation_present</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_confirmation_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_confirmation_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_confirmation_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_confirmation_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_confirmation_not_present</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000054-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 41</span>
|
|
41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_confirmation_present</span> <span class="ruby-identifier">variable_name</span>
|
|
42: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeConfirmationPresent'</span>, <span class="ruby-identifier">variable_name</span>
|
|
43: <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">store_editable</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Determines whether the specified input element is editable, i.e.
|
|
hasn’t been disabled. This method will fail if the specified element
|
|
isn’t an input element.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_editable(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_editable(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_editable(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_editable(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_editable(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_editable(locator)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 380</span>
|
|
380: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_editable</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
381: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeEditable'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
382: <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">store_element_present</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Verifies that the specified element is somewhere on the page.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_element_present(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_element_not_present(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_element_present(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_element_not_present(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_element_present(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_element_not_present(locator)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 349</span>
|
|
349: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_element_present</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
350: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeElementPresent'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
351: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000064" class="method-detail">
|
|
<a name="M000064"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000064" class="method-signature">
|
|
<span class="method-name">store_eval</span><span class="method-args">(script, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the result of evaluating the specified JavaScript snippet. The snippet
|
|
may have multiple lines, but only the result of the last line will be
|
|
returned.
|
|
</p>
|
|
<p>
|
|
Note that, by default, the snippet will run in the context of the
|
|
"selenium" object itself, so <tt>this</tt> will refer to the
|
|
Selenium object, and <tt>window</tt> will refer to the top-level runner
|
|
test window, not the window of your application.
|
|
</p>
|
|
<p>
|
|
If you need a reference to the window of your application, you can refer to
|
|
<tt>this.browserbot.getCurrentWindow()</tt> and if you need to use a
|
|
locator to refer to a single element in your application page, you can use
|
|
<tt>this.page().findElement("foo")</tt> where
|
|
<tt>"foo"</tt> is your locator.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_eval(script, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_eval(script, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_eval_present(script, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_eval(script, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_eval(script, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_eval(script, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000064-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 225</span>
|
|
225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_eval</span> <span class="ruby-identifier">script</span>, <span class="ruby-identifier">variable_name</span>
|
|
226: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeEval'</span>, <span class="ruby-identifier">script</span>, <span class="ruby-identifier">variable_name</span>
|
|
227: <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">store_expression</span><span class="method-args">(expression, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Returns the specified expression.
|
|
</p>
|
|
<p>
|
|
This is useful because of JavaScript preprocessing.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_expression(expression, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 468</span>
|
|
468: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_expression</span> <span class="ruby-identifier">expression</span>, <span class="ruby-identifier">variable_name</span>
|
|
469: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeExpression'</span>, <span class="ruby-identifier">expression</span>, <span class="ruby-identifier">variable_name</span>
|
|
470: <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">store_html_source</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Returns the entire HTML source between the opening and closing
|
|
"html" tags.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_html_source(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 453</span>
|
|
453: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_html_source</span> <span class="ruby-identifier">variable_name</span>
|
|
454: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeHtmlSource'</span>, <span class="ruby-identifier">variable_name</span>
|
|
455: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000059" class="method-detail">
|
|
<a name="M000059"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000059" class="method-signature">
|
|
<span class="method-name">store_location</span><span class="method-args">(expected_location, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Verify the location of the current page ends with the expected location. If
|
|
an URL querystring is provided, this is checked as well.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_location_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_location(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_location(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000059-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 143</span>
|
|
143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_location</span> <span class="ruby-identifier">expected_location</span>, <span class="ruby-identifier">variable_name</span>
|
|
144: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeLocation'</span>, <span class="ruby-identifier">expected_location</span>, <span class="ruby-identifier">variable_name</span>
|
|
145: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000057" class="method-detail">
|
|
<a name="M000057"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000057" class="method-signature">
|
|
<span class="method-name">store_prompt</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Retrieves the message of a JavaScript question prompt dialog generated
|
|
during the previous action.
|
|
</p>
|
|
<p>
|
|
Successful handling of the prompt requires prior execution of the
|
|
<tt>answer_on_next_prompt</tt> command. If a prompt is generated but you do
|
|
not get/verify it, the next Selenium action will fail.
|
|
</p>
|
|
<p>
|
|
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
|
|
</p>
|
|
<p>
|
|
NOTE: Selenium does NOT support JavaScript prompts that are generated in a
|
|
page’s <tt>onload()</tt> event handler. In this case a visible dialog
|
|
WILL be generated and Selenium will hang until someone manually clicks OK.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_prompt(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_prompt(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_prompt_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_prompt(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_prompt(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_prompt(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000057-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 116</span>
|
|
116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_prompt</span> <span class="ruby-identifier">variable_name</span>
|
|
117: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storePrompt'</span>, <span class="ruby-identifier">variable_name</span>
|
|
118: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000053" class="method-detail">
|
|
<a name="M000053"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000053" class="method-signature">
|
|
<span class="method-name">store_prompt_present</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Has a prompt occurred?
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_prompt_present</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_prompt_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_prompt_present</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_prompt_not_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_prompt_present</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_prompt_not_present</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000053-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 28</span>
|
|
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_prompt_present</span> <span class="ruby-identifier">variable_name</span>
|
|
29: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storePromptPresent'</span>, <span class="ruby-identifier">variable_name</span>
|
|
30: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000069" class="method-detail">
|
|
<a name="M000069"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000069" class="method-signature">
|
|
<span class="method-name">store_select_options</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets all option labels in the specified select drop-down.
|
|
</p>
|
|
<p>
|
|
The <tt>pattern</tt> for the automatically generated assertions can either
|
|
take an array or a pattern.
|
|
</p>
|
|
<pre>
|
|
assert_select_options 'fruits', ['apple', 'pear']
|
|
assert_select_options 'fruits', 'a*,p*'
|
|
</pre>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_select_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_select_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_select_options_present(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_select_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_select_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_select_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000069-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 309</span>
|
|
309: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_select_options</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
310: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeSelectOptions'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
311: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000067" class="method-detail">
|
|
<a name="M000067"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000067" class="method-signature">
|
|
<span class="method-name">store_selected</span><span class="method-args">(locator, option_locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Verifies that the selected option of a drop-down satisfies the
|
|
<tt>option_locator</tt>.
|
|
</p>
|
|
<p>
|
|
<tt>option_locator</tt> is typically just an option label (e.g. "John
|
|
Smith").
|
|
</p>
|
|
<p>
|
|
See the <tt>select</tt> command for more information about option locators.
|
|
</p>
|
|
<p>
|
|
NOTE: <tt><a
|
|
href="TestBuilderAccessors.html#M000067">store_selected</a></tt> is
|
|
currently not supported by Selenium Core.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_selected(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_selected(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_selected_present(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_selected(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_selected(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_selected(locator, option_locator)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000067-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 272</span>
|
|
272: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_selected</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">option_locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
273: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Not supported in Selenium Core at the moment'</span>
|
|
274: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000068" class="method-detail">
|
|
<a name="M000068"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000068" class="method-signature">
|
|
<span class="method-name">store_selected_options</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets all option labels for selected options in the specified select or
|
|
multi-select element.
|
|
</p>
|
|
<p>
|
|
The <tt>pattern</tt> for the automatically generated assertions can either
|
|
take an array or a pattern.
|
|
</p>
|
|
<pre>
|
|
assert_selected_options 'fruits', ['apple', 'pear']
|
|
assert_selected_options 'fruits', 'a*,p*'
|
|
</pre>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_selected_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_selected_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_selected_options_present(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_selected_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_selected_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_selected_options(locator, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000068-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 291</span>
|
|
291: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_selected_options</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
292: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeSelectedOptions'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
293: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000066" class="method-detail">
|
|
<a name="M000066"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000066" class="method-signature">
|
|
<span class="method-name">store_table</span><span class="method-args">(locator, row, column, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the text from a cell of a table.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_table(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_table(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_table_present(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_table(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_table(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_table(locator, row, column, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000066-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 252</span>
|
|
252: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_table</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">row</span>, <span class="ruby-identifier">column</span>, <span class="ruby-identifier">variable_name</span>
|
|
253: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeTable'</span>, <span class="ruby-node">"#{locator}.#{row}.#{column}"</span>, <span class="ruby-identifier">variable_name</span>
|
|
254: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000063" class="method-detail">
|
|
<a name="M000063"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000063" class="method-signature">
|
|
<span class="method-name">store_text</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the text of an element. This works for any element that contains text.
|
|
This command uses either the <tt>textContent</tt> (Mozilla-like browsers)
|
|
or the <tt>innerText</tt> (IE-like browsers) of the element, which is the
|
|
rendered text shown to the user.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_text(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_text(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_text_present(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_text(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_text(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_text(locator, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000063-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 200</span>
|
|
200: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_text</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
201: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeText'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
202: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<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">store_text_present</span><span class="method-args">(pattern, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Verifies that the specified text pattern appears somewhere on the rendered
|
|
page shown to the user.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_text_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_text_not_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_text_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_text_not_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_text_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_text_not_present(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 336</span>
|
|
336: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_text_present</span> <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">variable_name</span>
|
|
337: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeTextPresent'</span>, <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">variable_name</span>
|
|
338: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000060" class="method-detail">
|
|
<a name="M000060"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000060" class="method-signature">
|
|
<span class="method-name">store_title</span><span class="method-args">(variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the title of the current page.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_title(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_title(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_title_present(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_title(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_title(pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_title(pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000060-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 156</span>
|
|
156: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_title</span> <span class="ruby-identifier">variable_name</span>
|
|
157: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeTitle'</span>, <span class="ruby-identifier">variable_name</span>
|
|
158: <span class="ruby-keyword kw">end</span>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000062" class="method-detail">
|
|
<a name="M000062"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="#M000062" class="method-signature">
|
|
<span class="method-name">store_value</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Gets the (whitespace-trimmed) value of an input field (or anything else
|
|
with a value parameter). For checkbox/radio elements, the value will be
|
|
"on" or "off" depending on whether the element is
|
|
checked or not.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_value(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_value(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_value_present(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_value(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_value(locator, pattern)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_value(locator, pattern)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<p><a class="source-toggle" href="#"
|
|
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
|
<div class="method-source-code" id="M000062-source">
|
|
<pre>
|
|
<span class="ruby-comment cmt"># File lib/selenium_on_rails/test_builder_accessors.rb, line 184</span>
|
|
184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_value</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
185: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeValue'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
186: <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">store_visible</span><span class="method-args">(locator, variable_name)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Determines if the specified element is visible. An element can be rendered
|
|
invisible by setting the CSS "visibility" property to
|
|
"hidden", or the "display" property to
|
|
"none", either for the element itself or one if its ancestors.
|
|
This method will fail if the element is not present.
|
|
</p>
|
|
<p>
|
|
Related Assertions, automatically generated:
|
|
</p>
|
|
<ul>
|
|
<li><tt>assert_visible(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>assert_not_visible(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_visible(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>verify_not_visible(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_visible(locator)</tt>
|
|
|
|
</li>
|
|
<li><tt>wait_for_not_visible(locator)</tt>
|
|
|
|
</li>
|
|
</ul>
|
|
<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/test_builder_accessors.rb, line 365</span>
|
|
365: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_visible</span> <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
366: <span class="ruby-identifier">command</span> <span class="ruby-value str">'storeVisible'</span>, <span class="ruby-identifier">locator</span>, <span class="ruby-identifier">variable_name</span>
|
|
367: <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> |