Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f1eeefbac0
Fetching contributors…

Cannot retrieve contributors at this time

9711 lines (9685 sloc) 633.374 kb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RSpec results</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #fff;
font-size: 80%;
}
</style>
<script type="text/javascript">
// <![CDATA[
function moveProgressBar(percentDone) {
document.getElementById("rspec-header").style.width = percentDone +"%";
}
function makeRed(element_id) {
document.getElementById(element_id).style.background = '#C40D0D';
document.getElementById(element_id).style.color = '#FFFFFF';
}
function makeYellow(element_id) {
if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
{
document.getElementById(element_id).style.background = '#FAF834';
document.getElementById(element_id).style.color = '#000000';
}
else
{
document.getElementById(element_id).style.background = '#FAF834';
document.getElementById(element_id).style.color = '#000000';
}
}
// ]]>
</script>
<style type="text/css">
#rspec-header {
background: #65C400; color: #fff; height: 4em;
}
.rspec-report h1 {
margin: 0px 10px 0px 10px;
padding: 10px;
font-family: "Lucida Grande", Helvetica, sans-serif;
font-size: 1.8em;
position: absolute;
}
#summary {
margin: 0; padding: 5px 10px;
font-family: "Lucida Grande", Helvetica, sans-serif;
text-align: right;
top: 0px;
right: 0px;
float:right;
}
#summary p {
margin: 0 0 0 2px;
}
#summary #totals {
font-size: 1.2em;
}
.example_group {
margin: 0 10px 5px;
background: #fff;
}
dl {
margin: 0; padding: 0 0 5px;
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
}
dt {
padding: 3px;
background: #65C400;
color: #fff;
font-weight: bold;
}
dd {
margin: 5px 0 5px 5px;
padding: 3px 3px 3px 18px;
}
dd.spec.passed {
border-left: 5px solid #65C400;
border-bottom: 1px solid #65C400;
background: #DBFFB4; color: #3D7700;
}
dd.spec.failed {
border-left: 5px solid #C20000;
border-bottom: 1px solid #C20000;
color: #C20000; background: #FFFBD3;
}
dd.spec.not_implemented {
border-left: 5px solid #FAF834;
border-bottom: 1px solid #FAF834;
background: #FCFB98; color: #131313;
}
dd.spec.pending_fixed {
border-left: 5px solid #0000C2;
border-bottom: 1px solid #0000C2;
color: #0000C2; background: #D3FBFF;
}
.backtrace {
color: #000;
font-size: 12px;
}
a {
color: #BE5C00;
}
/* Ruby code, style similar to vibrant ink */
.ruby {
font-size: 12px;
font-family: monospace;
color: white;
background-color: black;
padding: 0.1em 0 0.2em 0;
}
.ruby .keyword { color: #FF6600; }
.ruby .constant { color: #339999; }
.ruby .attribute { color: white; }
.ruby .global { color: white; }
.ruby .module { color: white; }
.ruby .class { color: white; }
.ruby .string { color: #66FF00; }
.ruby .ident { color: white; }
.ruby .method { color: #FFCC00; }
.ruby .number { color: white; }
.ruby .char { color: white; }
.ruby .comment { color: #9933CC; }
.ruby .symbol { color: white; }
.ruby .regex { color: #44B4CC; }
.ruby .punct { color: white; }
.ruby .escape { color: white; }
.ruby .interp { color: white; }
.ruby .expr { color: white; }
.ruby .offending { background-color: gray; }
.ruby .linenum {
width: 75px;
padding: 0.1em 1em 0.2em 0;
color: #000000;
background-color: #FFFBD3;
}
</style>
</head>
<body>
<div class="rspec-report">
<div id="rspec-header">
<div id="label">
<h1>RSpec Code Examples</h1>
</div>
<div id="summary">
<p id="totals">&nbsp;</p>
<p id="duration">&nbsp;</p>
</div>
</div>
<div class="results">
<div class="example_group">
<dl>
<dt id="example_group_1">Area#exist?</dt>
<script type="text/javascript">moveProgressBar('0.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the area exists</span></dd>
<script type="text/javascript">makeRed('rspec-header');</script>
<script type="text/javascript">makeRed('example_group_1');</script>
<script type="text/javascript">moveProgressBar('0.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the element exists (default how = :id)</span>
<div class="failure" id="failure_1">
<div class="message"><pre>wrong number of arguments (1 for 2)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/area_spec.rb:32:in `area'
/Users/james/proj/safariwatir/spec/watirspec/area_spec.rb:32:</pre></div>
<pre class="ruby"><code><span class="linenum">30</span>
<span class="linenum">31</span> it "returns true if the element exists (default how = :id)" do
<span class="offending"><span class="linenum">32</span> browser.area("NCE").should exist</span>
<span class="linenum">33</span> end
<span class="linenum">34</span>
<span class="linenum">35</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('0.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the area doesn't exist</span></dd>
<script type="text/javascript">moveProgressBar('0.4');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('0.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_2">Area#id</dt>
<script type="text/javascript">moveProgressBar('0.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the id attribute</span></dd>
<script type="text/javascript">moveProgressBar('0.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('0.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the area doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_3">Area#name</dt>
<script type="text/javascript">moveProgressBar('0.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the name attribute</span></dd>
<script type="text/javascript">moveProgressBar('1.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('1.1');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the area doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_4">Area#respond_to?</dt>
<script type="text/javascript">moveProgressBar('1.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true for all attribute methods</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_5">Areas#length</dt>
<script type="text/javascript">moveProgressBar('1.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the number of areas</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_6">Areas#[]</dt>
<script type="text/javascript">moveProgressBar('1.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the area at the given index</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_7">Areas#each</dt>
<script type="text/javascript">moveProgressBar('1.6');</script>
<dd class="spec passed"><span class="passed_spec_name">iterates through areas correctly</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_8">Browser</dt>
<script type="text/javascript">moveProgressBar('1.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException when trying to access DOM elements on plain/text-page</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_9">Browser#exists?</dt>
<script type="text/javascript">makeRed('example_group_9');</script>
<script type="text/javascript">moveProgressBar('1.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if we are at a page</span>
<div class="failure" id="failure_2">
<div class="message"><pre>undefined method `exist?' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:9:</pre></div>
<pre class="ruby"><code><span class="linenum">7</span> it "returns true if we are at a page" do
<span class="linenum">8</span> browser.goto(WatirSpec.files + "/non_control_elements.html")
<span class="offending"><span class="linenum">9</span> browser.should exist</span>
<span class="linenum">10</span> end
<span class="linenum">11</span>
<span class="linenum">12</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('1.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns false after IE#close</span>
<div class="failure" id="failure_3">
<div class="message"><pre>undefined method `exist?' for #&lt;Watir::Safari:0x113275060&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:15:</pre></div>
<pre class="ruby"><code><span class="linenum">13</span> b = WatirSpec.new_browser
<span class="linenum">14</span> b.close
<span class="offending"><span class="linenum">15</span> b.should_not exist</span>
<span class="linenum">16</span> end
<span class="linenum">17</span> end
<span class="linenum">18</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_10">Browser#html</dt>
<script type="text/javascript">makeRed('example_group_10');</script>
<script type="text/javascript">moveProgressBar('2.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the downloaed HTML of the page</span>
<div class="failure" id="failure_4">
<div class="message"><pre>CommandError
OSERROR: -609
MESSAGE: Connection is invalid.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;file:///Users/james/proj/safariwatir/spec/watirspec/html/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:23:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_11">Browser#title</dt>
<script type="text/javascript">makeRed('example_group_11');</script>
<script type="text/javascript">moveProgressBar('2.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the current page title</span>
<div class="failure" id="failure_5">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;file:///Users/james/proj/safariwatir/spec/watirspec/html/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:38:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_12">Browser#status</dt>
<script type="text/javascript">makeRed('example_group_12');</script>
<script type="text/javascript">moveProgressBar('2.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the current value of window.status</span>
<div class="failure" id="failure_6">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;file:///Users/james/proj/safariwatir/spec/watirspec/html/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:46:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_13">Browser#text</dt>
<script type="text/javascript">makeRed('example_group_13');</script>
<script type="text/javascript">moveProgressBar('2.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the text of the page</span>
<div class="failure" id="failure_7">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;file:///Users/james/proj/safariwatir/spec/watirspec/html/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:58:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('2.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the text also if the content-type is text/plain</span>
<div class="failure" id="failure_8">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;http://127.0.0.1:2000/plain_text&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:64:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_14">Browser#url</dt>
<script type="text/javascript">makeRed('example_group_14');</script>
<script type="text/javascript">moveProgressBar('2.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the current url</span>
<div class="failure" id="failure_9">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;http://127.0.0.1:2000/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:71:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_15">Browser#document</dt>
<script type="text/javascript">makeRed('example_group_15');</script>
<script type="text/javascript">moveProgressBar('2.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the underlying object</span>
<div class="failure" id="failure_10">
<div class="message"><pre>CommandError
OSERROR: -600
MESSAGE: Application isn't running.
COMMAND: app(&quot;/Applications/Safari.app&quot;).documents[1].URL.set(&quot;file:///Users/james/proj/safariwatir/spec/watirspec/html/non_control_elements.html&quot;)
</pre></div>
<div class="backtrace"><pre>/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:529:in `_send_command'
/Users/james/.gem/ruby/1.8/gems/rb-appscript-0.5.3/lib/appscript.rb:643:in `method_missing'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:78:</pre></div>
<pre class="ruby"><code><span class="linenum">527</span> AEM::Application.launch(@AS_app_data.identifier)
<span class="linenum">528</span> elsif code != 'aevtoapp'
<span class="offending"><span class="linenum">529</span> raise CommandError.new(self, name, args, e, @AS_app_data)</span>
<span class="linenum">530</span> end
<span class="linenum">531</span> end
<span class="linenum">532</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_16">Browser.start</dt>
<script type="text/javascript">moveProgressBar('2.8');</script>
<dd class="spec passed"><span class="passed_spec_name">goes to the given URL and return an instance of itself</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_17">Browser#goto</dt>
<script type="text/javascript">makeRed('example_group_17');</script>
<script type="text/javascript">moveProgressBar('2.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">adds http:// to URLs with no URL scheme specified</span>
<div class="failure" id="failure_11">
<div class="message"><pre>expected: /http:\/\/127.0.0.1:2000\/?/,
got: &quot;file:///Applications/Safari.app/Contents/Resources/&quot; (using =~)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:102:</pre></div>
<pre class="ruby"><code><span class="linenum">100</span> url.should_not be_nil
<span class="linenum">101</span> browser.goto(url)
<span class="offending"><span class="linenum">102</span> browser.url.should =~ %r[http://#{url}/?]</span>
<span class="linenum">103</span> end
<span class="linenum">104</span>
<span class="linenum">105</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('3.0');</script>
<dd class="spec passed"><span class="passed_spec_name">goes to the given url without raising errors</span></dd>
<script type="text/javascript">moveProgressBar('3.1');</script>
<dd class="spec passed"><span class="passed_spec_name">updates the page when location is changed with setTimeout + window.location</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_18">Browser#refresh</dt>
<script type="text/javascript">makeRed('example_group_18');</script>
<script type="text/javascript">moveProgressBar('3.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">refreshes the page</span>
<div class="failure" id="failure_12">
<div class="message"><pre>expected &quot;This is a footer with text set by Javascript.&quot; not to include &quot;Javascript&quot;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:122:</pre></div>
<pre class="ruby"><code><span class="linenum">120</span> browser.span(:name, 'footer').text.should include('Javascript')
<span class="linenum">121</span> browser.refresh
<span class="offending"><span class="linenum">122</span> browser.span(:name, 'footer').text.should_not include('Javascript')</span>
<span class="linenum">123</span> end
<span class="linenum">124</span> end
<span class="linenum">125</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_19">Browser#execute_script</dt>
<script type="text/javascript">makeRed('example_group_19');</script>
<script type="text/javascript">moveProgressBar('3.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">executes the given JavaScript on the current page</span>
<div class="failure" id="failure_13">
<div class="message"><pre>undefined method `execute_script' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:130:</pre></div>
<pre class="ruby"><code><span class="linenum">128</span> browser.goto(WatirSpec.files + "/non_control_elements.html")
<span class="linenum">129</span> browser.pre(:id, 'rspec').text.should_not == "javascript text"
<span class="offending"><span class="linenum">130</span> browser.execute_script("document.getElementById('rspec').innerHTML = 'javascript text'")</span>
<span class="linenum">131</span> browser.pre(:id, 'rspec').text.should == "javascript text"
<span class="linenum">132</span> end
<span class="linenum">133</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_20">Browser#back and #forward</dt>
<script type="text/javascript">makeRed('example_group_20');</script>
<script type="text/javascript">moveProgressBar('3.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">goes to the previous page</span>
<div class="failure" id="failure_14">
<div class="message"><pre>undefined method `back' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:142:</pre></div>
<pre class="ruby"><code><span class="linenum">140</span> new_url = browser.url
<span class="linenum">141</span> orig_url.should_not == new_url
<span class="offending"><span class="linenum">142</span> browser.back</span>
<span class="linenum">143</span> orig_url.should == browser.url
<span class="linenum">144</span> end
<span class="linenum">145</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('3.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">goes to the next page</span>
<div class="failure" id="failure_15">
<div class="message"><pre>undefined method `back' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:153:</pre></div>
<pre class="ruby"><code><span class="linenum">151</span> urls << browser.url
<span class="linenum">152</span>
<span class="offending"><span class="linenum">153</span> browser.back</span>
<span class="linenum">154</span> browser.url.should == urls.first
<span class="linenum">155</span> browser.forward
<span class="linenum">156</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('3.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">navigates between several history items</span>
<div class="failure" id="failure_16">
<div class="message"><pre>undefined method `back' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:169:
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:169:in `times'
/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:169:</pre></div>
<pre class="ruby"><code><span class="linenum">167</span> end
<span class="linenum">168</span>
<span class="offending"><span class="linenum">169</span> 3.times { browser.back }</span>
<span class="linenum">170</span> browser.url.should == urls.first
<span class="linenum">171</span> 2.times { browser.forward }
<span class="linenum">172</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_21">Browser#contains_text</dt>
<script type="text/javascript">moveProgressBar('3.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises ArgumentError when called with no arguments</span></dd>
<script type="text/javascript">moveProgressBar('3.9');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when called with wrong arguments</span></dd>
<script type="text/javascript">moveProgressBar('4.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the index if the given text exists</span></dd>
<script type="text/javascript">moveProgressBar('4.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns nil if the text doesn't exist</span></dd>
<script type="text/javascript">moveProgressBar('4.2');</script>
<dd class="spec passed"><span class="passed_spec_name">does not raise error on a blank page</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_22">Browser#element_by_xpath</dt>
<script type="text/javascript">makeRed('example_group_22');</script>
<script type="text/javascript">moveProgressBar('4.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">finds submit buttons matching the given xpath</span>
<div class="failure" id="failure_17">
<div class="message"><pre>undefined method `element_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:214:</pre></div>
<pre class="ruby"><code><span class="linenum">212</span> bug "WTR-343", :watir do
<span class="linenum">213</span> it "finds submit buttons matching the given xpath" do
<span class="offending"><span class="linenum">214</span> browser.element_by_xpath("//input[@type='submit']").should exist</span>
<span class="linenum">215</span> end
<span class="linenum">216</span>
<span class="linenum">217</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('4.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">finds reset buttons matching the given xpath</span>
<div class="failure" id="failure_18">
<div class="message"><pre>undefined method `element_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:218:</pre></div>
<pre class="ruby"><code><span class="linenum">216</span>
<span class="linenum">217</span> it "finds reset buttons matching the given xpath" do
<span class="offending"><span class="linenum">218</span> browser.element_by_xpath("//input[@type='reset']").should exist</span>
<span class="linenum">219</span> end
<span class="linenum">220</span>
<span class="linenum">221</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('4.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">finds image buttons matching the given xpath</span>
<div class="failure" id="failure_19">
<div class="message"><pre>undefined method `element_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:222:</pre></div>
<pre class="ruby"><code><span class="linenum">220</span>
<span class="linenum">221</span> it "finds image buttons matching the given xpath" do
<span class="offending"><span class="linenum">222</span> browser.element_by_xpath("//input[@type='image']").should exist</span>
<span class="linenum">223</span> end
<span class="linenum">224</span>
<span class="linenum">225</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('4.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">finds the element matching the given xpath</span>
<div class="failure" id="failure_20">
<div class="message"><pre>undefined method `element_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:226:</pre></div>
<pre class="ruby"><code><span class="linenum">224</span>
<span class="linenum">225</span> it "finds the element matching the given xpath" do
<span class="offending"><span class="linenum">226</span> browser.element_by_xpath("//input[@type='password']").should exist</span>
<span class="linenum">227</span> end
<span class="linenum">228</span> end
<span class="linenum">229</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('4.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">will not find elements that doesn't exist</span>
<div class="failure" id="failure_21">
<div class="message"><pre>undefined method `element_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:232:</pre></div>
<pre class="ruby"><code><span class="linenum">230</span> bug "WTR-327", :watir do
<span class="linenum">231</span> it "will not find elements that doesn't exist" do
<span class="offending"><span class="linenum">232</span> e = browser.element_by_xpath("//input[@type='foobar']")</span>
<span class="linenum">233</span> e.should_not exist
<span class="linenum">234</span> lambda { e.set('foo') }.should raise_error(UnknownObjectException)
<span class="linenum">235</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_23">Browser#elements_by_xpath</dt>
<script type="text/javascript">makeRed('example_group_23');</script>
<script type="text/javascript">moveProgressBar('4.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an Array of matching elements</span>
<div class="failure" id="failure_22">
<div class="message"><pre>undefined method `elements_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:246:</pre></div>
<pre class="ruby"><code><span class="linenum">244</span> bug "WTR-344", :watir do
<span class="linenum">245</span> it "returns an Array of matching elements" do
<span class="offending"><span class="linenum">246</span> objects = browser.elements_by_xpath("//*[@type='text']")</span>
<span class="linenum">247</span> objects.should be_kind_of(Array)
<span class="linenum">248</span> objects.size.should == 6
<span class="linenum">249</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('4.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty Array if there are no matching elements</span>
<div class="failure" id="failure_23">
<div class="message"><pre>undefined method `elements_by_xpath' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:254:</pre></div>
<pre class="ruby"><code><span class="linenum">252</span> bug "WTR-328", :watir do
<span class="linenum">253</span> it "returns an empty Array if there are no matching elements" do
<span class="offending"><span class="linenum">254</span> objects = browser.elements_by_xpath("//*[@type='foobar']")</span>
<span class="linenum">255</span> objects.should be_kind_of(Array)
<span class="linenum">256</span> objects.size.should == 0
<span class="linenum">257</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_24">Browser#add_checker</dt>
<script type="text/javascript">makeRed('example_group_24');</script>
<script type="text/javascript">moveProgressBar('5.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises ArgumentError when not given any arguments</span>
<div class="failure" id="failure_24">
<div class="message"><pre>expected ArgumentError, got #&lt;NoMethodError: undefined method `add_checker' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:263:</pre></div>
<pre class="ruby"><code><span class="linenum">261</span> describe "#add_checker" do
<span class="linenum">262</span> it "raises ArgumentError when not given any arguments" do
<span class="offending"><span class="linenum">263</span> lambda { browser.add_checker }.should raise_error(ArgumentError)</span>
<span class="linenum">264</span> end
<span class="linenum">265</span>
<span class="linenum">266</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('5.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">runs the given proc on each page load</span>
<div class="failure" id="failure_25">
<div class="message"><pre>undefined method `add_checker' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:270:</pre></div>
<pre class="ruby"><code><span class="linenum">268</span> proc = Proc.new { |browser| output << browser.text }
<span class="linenum">269</span>
<span class="offending"><span class="linenum">270</span> browser.add_checker(proc)</span>
<span class="linenum">271</span> browser.goto(WatirSpec.files + "/non_control_elements.html")
<span class="linenum">272</span>
<span class="linenum">273</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_25">Browser#disable_checker</dt>
<script type="text/javascript">makeRed('example_group_25');</script>
<script type="text/javascript">moveProgressBar('5.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">removes a previously added checker</span>
<div class="failure" id="failure_26">
<div class="message"><pre>undefined method `add_checker' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/browser_spec.rb:282:</pre></div>
<pre class="ruby"><code><span class="linenum">280</span> checker = lambda { |browser| output << browser.text }
<span class="linenum">281</span>
<span class="offending"><span class="linenum">282</span> browser.add_checker(checker)</span>
<span class="linenum">283</span> browser.goto(WatirSpec.files + "/non_control_elements.html")
<span class="linenum">284</span> output.should include('Dubito, ergo cogito, ergo sum')
<span class="linenum">285</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_26">Button#exists?</dt>
<script type="text/javascript">makeRed('example_group_26');</script>
<script type="text/javascript">moveProgressBar('5.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the button exists</span>
<div class="failure" id="failure_27">
<div class="message"><pre>expected #&lt;Watir::Container::Button:0x112f79c80 @how=:value, @parent=#&lt;Watir::Safari:0x1017a4e30 @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;&gt;, @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;, @what=&quot;Button 2&quot;&gt; to exist</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:17:</pre></div>
<pre class="ruby"><code><span class="linenum">15</span> browser.button(:name, "new_user_reset").should exist
<span class="linenum">16</span> browser.button(:name, /new_user_reset/).should exist
<span class="offending"><span class="linenum">17</span> browser.button(:value, "Button 2").should exist</span>
<span class="linenum">18</span> browser.button(:value, /Button 2/).should exist
<span class="linenum">19</span> browser.button(:src, "images/button.jpg").should exist
<span class="linenum">20</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('5.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the button exists (how = :caption)</span>
<div class="failure" id="failure_28">
<div class="message"><pre></pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:32:</pre></div>
<pre class="ruby"><code><span class="linenum">30</span>
<span class="linenum">31</span> it "returns true if the button exists (how = :caption)" do
<span class="offending"><span class="linenum">32</span> browser.button(:caption, "Button 2").should exist</span>
<span class="linenum">33</span> browser.button(:caption, /Button 2/).should exist
<span class="linenum">34</span> end
<span class="linenum">35</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('5.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the button exists (default how = :value)</span>
<div class="failure" id="failure_29">
<div class="message"><pre>wrong number of arguments (1 for 2)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:37:in `button'
/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:37:</pre></div>
<pre class="ruby"><code><span class="linenum">35</span>
<span class="linenum">36</span> it "returns true if the button exists (default how = :value)" do
<span class="offending"><span class="linenum">37</span> browser.button("Submit").should exist</span>
<span class="linenum">38</span> end
<span class="linenum">39</span>
<span class="linenum">40</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('5.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the button doesn't exist</span></dd>
<script type="text/javascript">moveProgressBar('5.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('5.9');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_27">Button#class_name</dt>
<script type="text/javascript">makeRed('example_group_27');</script>
<script type="text/javascript">moveProgressBar('6.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the class name of the button</span>
<div class="failure" id="failure_30">
<div class="message"><pre>Unable to locate Button, using :name and &quot;new_user_image&quot;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:74:</pre></div>
<pre class="ruby"><code><span class="linenum">72</span> describe "#class_name" do
<span class="linenum">73</span> it "returns the class name of the button" do
<span class="offending"><span class="linenum">74</span> browser.button(:name, "new_user_image").class_name.should == "image"</span>
<span class="linenum">75</span> end
<span class="linenum">76</span>
<span class="linenum">77</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('6.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the button has no class name</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_28">Button#id</dt>
<script type="text/javascript">moveProgressBar('6.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the id if the button exists</span></dd>
<script type="text/javascript">makeRed('example_group_28');</script>
<script type="text/javascript">moveProgressBar('6.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if button does not exist</span>
<div class="failure" id="failure_31">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException with &quot;Unable to locate Button, using :index and 1337&quot;, got #&lt;Watir::Exception::UnknownObjectException: Unable to locate Button, using :index and &quot;1337&quot;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:90:</pre></div>
<pre class="ruby"><code><span class="linenum">88</span>
<span class="linenum">89</span> it "raises UnknownObjectException if button does not exist" do
<span class="offending"><span class="linenum">90</span> lambda { browser.button(:index, 1337).id }.should raise_error(UnknownObjectException, 'Unable to locate Button, using :index and 1337')</span>
<span class="linenum">91</span> end
<span class="linenum">92</span> end
<span class="linenum">93</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_29">Button#name</dt>
<script type="text/javascript">moveProgressBar('6.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the name if button exists</span></dd>
<script type="text/javascript">moveProgressBar('6.6');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the button does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_30">Button#src</dt>
<script type="text/javascript">makeRed('example_group_30');</script>
<script type="text/javascript">moveProgressBar('6.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the src attribute for the button image</span>
<div class="failure" id="failure_32">
<div class="message"><pre>Unable to locate Button, using :name and &quot;new_user_image&quot;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:109:</pre></div>
<pre class="ruby"><code><span class="linenum">107</span> not_compliant_on :watir do
<span class="linenum">108</span> it "returns the src attribute for the button image" do
<span class="offending"><span class="linenum">109</span> browser.button(:name, "new_user_image").src.should == "images/button.jpg"</span>
<span class="linenum">110</span> end
<span class="linenum">111</span> end
<span class="linenum">112</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('6.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the button does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_31">Button#style</dt>
<script type="text/javascript">makeRed('example_group_31');</script>
<script type="text/javascript">moveProgressBar('6.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the style attribute if the button exists</span>
<div class="failure" id="failure_33">
<div class="message"><pre>undefined method `style' for #&lt;Watir::Container::Button:0x112ef2550&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:133:</pre></div>
<pre class="ruby"><code><span class="linenum">131</span> not_compliant_on :watir do
<span class="linenum">132</span> it "returns the style attribute if the button exists" do
<span class="offending"><span class="linenum">133</span> browser.button(:id, 'delete_user_submit').style.should == "border: 4px solid red;"</span>
<span class="linenum">134</span> end
<span class="linenum">135</span> end
<span class="linenum">136</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('7.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists and the attribute doesn't exist</span>
<div class="failure" id="failure_34">
<div class="message"><pre>undefined method `style' for #&lt;Watir::Container::Button:0x112ee9fb8&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:138:</pre></div>
<pre class="ruby"><code><span class="linenum">136</span>
<span class="linenum">137</span> it "returns an empty string if the element exists and the attribute doesn't exist" do
<span class="offending"><span class="linenum">138</span> browser.button(:id, 'new_user_submit').style.should == ""</span>
<span class="linenum">139</span> end
<span class="linenum">140</span>
<span class="linenum">141</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('7.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the button does not exist</span>
<div class="failure" id="failure_35">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException with &quot;Unable to locate Button, using :name and \&quot;no_such_name\&quot;&quot;, got #&lt;NoMethodError: undefined method `style' for #&lt;Watir::Container::Button:0x112ee02b0&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:142:</pre></div>
<pre class="ruby"><code><span class="linenum">140</span>
<span class="linenum">141</span> it "raises UnknownObjectException if the button does not exist" do
<span class="offending"><span class="linenum">142</span> lambda { browser.button(:name, "no_such_name").style }.should raise_error(UnknownObjectException, 'Unable to locate Button, using :name and "no_such_name"')</span>
<span class="linenum">143</span> end
<span class="linenum">144</span> end
<span class="linenum">145</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_32">Button#title</dt>
<script type="text/javascript">moveProgressBar('7.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the title of the button</span></dd>
<script type="text/javascript">moveProgressBar('7.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string for button without title</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_33">Button#type</dt>
<script type="text/javascript">moveProgressBar('7.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the type if button exists</span></dd>
<script type="text/javascript">moveProgressBar('7.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if button does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_34">Button#value</dt>
<script type="text/javascript">moveProgressBar('7.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the value if button exists</span></dd>
<script type="text/javascript">moveProgressBar('7.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if button does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_35">Button#respond_to?</dt>
<script type="text/javascript">makeRed('example_group_35');</script>
<script type="text/javascript">moveProgressBar('7.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true for all attribute methods</span>
<div class="failure" id="failure_36">
<div class="message"><pre>expected #&lt;Watir::Container::Button:0x112ebdb98 @how=:index, @parent=#&lt;Watir::Safari:0x1017a4e30 @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;&gt;, @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;, @what=1&gt; to respond to :style</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:186:</pre></div>
<pre class="ruby"><code><span class="linenum">184</span> browser.button(:index, 1).should respond_to(:name)
<span class="linenum">185</span> browser.button(:index, 1).should respond_to(:src)
<span class="offending"><span class="linenum">186</span> browser.button(:index, 1).should respond_to(:style)</span>
<span class="linenum">187</span> browser.button(:index, 1).should respond_to(:title)
<span class="linenum">188</span> browser.button(:index, 1).should respond_to(:type)
<span class="linenum">189</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_36">Button#enabled?</dt>
<script type="text/javascript">moveProgressBar('8.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the button is enabled</span></dd>
<script type="text/javascript">moveProgressBar('8.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the button is disabled</span></dd>
<script type="text/javascript">moveProgressBar('8.2');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the button doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_37">Button#disabled?</dt>
<script type="text/javascript">moveProgressBar('8.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false when button is enabled</span></dd>
<script type="text/javascript">moveProgressBar('8.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true when button is disabled</span></dd>
<script type="text/javascript">moveProgressBar('8.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if button does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_38">Button#click</dt>
<script type="text/javascript">moveProgressBar('8.6');</script>
<dd class="spec passed"><span class="passed_spec_name">clicks the button if it exists</span></dd>
<script type="text/javascript">moveProgressBar('8.7');</script>
<dd class="spec passed"><span class="passed_spec_name">fires events</span></dd>
<script type="text/javascript">moveProgressBar('8.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException when clicking a button that doesn't exist</span></dd>
<script type="text/javascript">makeRed('example_group_38');</script>
<script type="text/javascript">moveProgressBar('8.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises ObjectDisabledException when clicking a disabled button</span>
<div class="failure" id="failure_37">
<div class="message"><pre>expected Watir::Exception::ObjectDisabledException but nothing was raised</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/button_spec.rb:241:</pre></div>
<pre class="ruby"><code><span class="linenum">239</span>
<span class="linenum">240</span> it "raises ObjectDisabledException when clicking a disabled button" do
<span class="offending"><span class="linenum">241</span> lambda { browser.button(:value, "Disabled").click }.should raise_error(ObjectDisabledException)</span>
<span class="linenum">242</span> end
<span class="linenum">243</span> end
<span class="linenum">244</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_39">Buttons#length</dt>
<script type="text/javascript">makeRed('example_group_39');</script>
<script type="text/javascript">moveProgressBar('9.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the number of buttons</span>
<div class="failure" id="failure_38">
<div class="message"><pre>expected: 8,
got: 7 (using ==)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/buttons_spec.rb:13:</pre></div>
<pre class="ruby"><code><span class="linenum">11</span> bug "WTR-349", :watir do
<span class="linenum">12</span> it "returns the number of buttons" do
<span class="offending"><span class="linenum">13</span> browser.buttons.length.should == 8</span>
<span class="linenum">14</span> end
<span class="linenum">15</span> end
<span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_40">Buttons#[]</dt>
<script type="text/javascript">moveProgressBar('9.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the button at the given index</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_41">Buttons#first</dt>
<script type="text/javascript">moveProgressBar('9.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the first element in the collection</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_42">Buttons#last</dt>
<script type="text/javascript">moveProgressBar('9.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the last element in the collection</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_43">Buttons#each</dt>
<script type="text/javascript">moveProgressBar('9.5');</script>
<dd class="spec passed"><span class="passed_spec_name">iterates through buttons correctly</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_44">CheckBox#exists?</dt>
<script type="text/javascript">moveProgressBar('9.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the checkbox button exists</span></dd>
<script type="text/javascript">makeRed('example_group_44');</script>
<script type="text/javascript">moveProgressBar('9.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the element exists (default how = :name)</span>
<div class="failure" id="failure_39">
<div class="message"><pre>wrong number of arguments (1 for 2)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:30:in `checkbox'
/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:30:</pre></div>
<pre class="ruby"><code><span class="linenum">28</span>
<span class="linenum">29</span> it "returns true if the element exists (default how = :name)" do
<span class="offending"><span class="linenum">30</span> browser.checkbox("new_user_interests").should exist</span>
<span class="linenum">31</span> end
<span class="linenum">32</span>
<span class="linenum">33</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('9.8');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the checkbox button exists (search by name and value)</span></dd>
<script type="text/javascript">moveProgressBar('9.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the checkbox button does not exist</span></dd>
<script type="text/javascript">moveProgressBar('10.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns false if the checkbox button does not exist (search by name and value)</span>
<div class="failure" id="failure_40">
<div class="message"><pre>expected #&lt;Watir::Container::Checkbox:0x1131f1cb0 @how=:name, @value=&quot;no_such_value&quot;, @parent=#&lt;Watir::Safari:0x1017a4e30 @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;&gt;, @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;, @what=&quot;new_user_interests&quot;&gt; not to exist</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:54:</pre></div>
<pre class="ruby"><code><span class="linenum">52</span>
<span class="linenum">53</span> it "returns false if the checkbox button does not exist (search by name and value)" do
<span class="offending"><span class="linenum">54</span> browser.checkbox(:name, "new_user_interests", 'no_such_value').should_not exist</span>
<span class="linenum">55</span> browser.checkbox(:xpath, "//input[@name='new_user_interests' and @value='no_such_value']").should_not exist
<span class="linenum">56</span> browser.checkbox(:name, "no_such_name", 'cars').should_not exist
<span class="linenum">57</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('10.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true for checkboxs with a string value</span></dd>
<script type="text/javascript">moveProgressBar('10.2');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('10.4');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_45">CheckBox#class_name</dt>
<script type="text/javascript">moveProgressBar('10.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the class name if the checkbox exists and has an attribute</span></dd>
<script type="text/javascript">moveProgressBar('10.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an emptry string if the checkbox exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('10.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_46">CheckBox#id</dt>
<script type="text/javascript">moveProgressBar('10.8');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the id attribute if the checkbox exists and has an attribute</span></dd>
<script type="text/javascript">moveProgressBar('10.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an emptry string if the checkbox exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('11.0');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_47">CheckBox#name</dt>
<script type="text/javascript">moveProgressBar('11.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the name attribute if the checkbox exists</span></dd>
<script type="text/javascript">moveProgressBar('11.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the checkbox exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('11.3');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_48">CheckBox#title</dt>
<script type="text/javascript">moveProgressBar('11.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the title attribute if the checkbox exists</span></dd>
<script type="text/javascript">moveProgressBar('11.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an emptry string if the checkbox exists and the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('11.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_49">CheckBox#type</dt>
<script type="text/javascript">moveProgressBar('11.8');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the type attribute if the checkbox exists</span></dd>
<script type="text/javascript">moveProgressBar('11.9');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_50">CheckBox#value</dt>
<script type="text/javascript">moveProgressBar('12.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the value attribute if the checkbox exists</span></dd>
<script type="text/javascript">moveProgressBar('12.1');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_51">CheckBox#respond_to?</dt>
<script type="text/javascript">moveProgressBar('12.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true for all attribute methods</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_52">CheckBox#enabled?</dt>
<script type="text/javascript">moveProgressBar('12.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the checkbox button is enabled</span></dd>
<script type="text/javascript">moveProgressBar('12.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the checkbox button is disabled</span></dd>
<script type="text/javascript">moveProgressBar('12.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox button doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_53">CheckBox#disabled?</dt>
<script type="text/javascript">moveProgressBar('12.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the checkbox is disabled</span></dd>
<script type="text/javascript">moveProgressBar('12.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the checkbox is enabled</span></dd>
<script type="text/javascript">moveProgressBar('12.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox doesn't exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_54">CheckBox#clear</dt>
<script type="text/javascript">makeRed('example_group_54');</script>
<script type="text/javascript">moveProgressBar('13.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises ObjectDisabledException if the checkbox is disabled</span>
<div class="failure" id="failure_41">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x1131147e8&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:200:</pre></div>
<pre class="ruby"><code><span class="linenum">198</span> describe "#clear" do
<span class="linenum">199</span> it "raises ObjectDisabledException if the checkbox is disabled" do
<span class="offending"><span class="linenum">200</span> browser.checkbox(:id, "new_user_interests_dentistry").should_not be_set</span>
<span class="linenum">201</span> lambda { browser.checkbox(:id, "new_user_interests_dentistry").clear }.should raise_error(ObjectDisabledException)
<span class="linenum">202</span> lambda { browser.checkbox(:xpath, "//input[@id='new_user_interests_dentistry']").clear }.should raise_error(ObjectDisabledException)
<span class="linenum">203</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">clears the checkbox button if it is set</span>
<div class="failure" id="failure_42">
<div class="message"><pre>undefined method `clear' for #&lt;Watir::Container::Checkbox:0x1131051a8&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:206:</pre></div>
<pre class="ruby"><code><span class="linenum">204</span>
<span class="linenum">205</span> it "clears the checkbox button if it is set" do
<span class="offending"><span class="linenum">206</span> browser.checkbox(:id, "new_user_interests_books").clear</span>
<span class="linenum">207</span> browser.checkbox(:id, "new_user_interests_books").should_not be_set
<span class="linenum">208</span> end
<span class="linenum">209</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">clears the checkbox button when found by :xpath</span>
<div class="failure" id="failure_43">
<div class="message"><pre>undefined method `clear' for #&lt;Watir::Container::Checkbox:0x1130f1388&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:211:</pre></div>
<pre class="ruby"><code><span class="linenum">209</span>
<span class="linenum">210</span> it "clears the checkbox button when found by :xpath" do
<span class="offending"><span class="linenum">211</span> browser.checkbox(:xpath, "//input[@id='new_user_interests_books']").clear</span>
<span class="linenum">212</span> browser.checkbox(:xpath, "//input[@id='new_user_interests_books']").should_not be_set
<span class="linenum">213</span> end
<span class="linenum">214</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the checkbox button doesn't exist</span>
<div class="failure" id="failure_44">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `clear' for #&lt;Watir::Container::Checkbox:0x1130d9940&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:216:</pre></div>
<pre class="ruby"><code><span class="linenum">214</span>
<span class="linenum">215</span> it "raises UnknownObjectException if the checkbox button doesn't exist" do
<span class="offending"><span class="linenum">216</span> lambda { browser.checkbox(:name, "no_such_id").clear }.should raise_error(UnknownObjectException)</span>
<span class="linenum">217</span> lambda { browser.checkbox(:xpath, "//input[@id='no_such_id']").clear }.should raise_error(UnknownObjectException)
<span class="linenum">218</span> end
<span class="linenum">219</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_55">CheckBox#set</dt>
<script type="text/javascript">makeRed('example_group_55');</script>
<script type="text/javascript">moveProgressBar('13.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">sets the checkbox button</span>
<div class="failure" id="failure_45">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x1130b8218&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:224:</pre></div>
<pre class="ruby"><code><span class="linenum">222</span> it "sets the checkbox button" do
<span class="linenum">223</span> browser.checkbox(:id, "new_user_interests_cars").set
<span class="offending"><span class="linenum">224</span> browser.checkbox(:id, "new_user_interests_cars").should be_set</span>
<span class="linenum">225</span> end
<span class="linenum">226</span>
<span class="linenum">227</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">sets the checkbox button when found by :xpath</span>
<div class="failure" id="failure_46">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x1130a0e38&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:229:</pre></div>
<pre class="ruby"><code><span class="linenum">227</span> it "sets the checkbox button when found by :xpath" do
<span class="linenum">228</span> browser.checkbox(:xpath, "//input[@id='new_user_interests_cars']").set
<span class="offending"><span class="linenum">229</span> browser.checkbox(:xpath, "//input[@id='new_user_interests_cars']").should be_set</span>
<span class="linenum">230</span> end
<span class="linenum">231</span>
<span class="linenum">232</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">fires the onclick event</span>
<div class="failure" id="failure_47">
<div class="message"><pre>undefined method `clear' for #&lt;Watir::Container::Checkbox:0x113086ec0&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:236:</pre></div>
<pre class="ruby"><code><span class="linenum">234</span> browser.checkbox(:id, "toggle_button_checkbox").set
<span class="linenum">235</span> browser.button(:id, "disabled_button").should_not be_disabled
<span class="offending"><span class="linenum">236</span> browser.checkbox(:id, "toggle_button_checkbox").clear</span>
<span class="linenum">237</span> browser.button(:id, "disabled_button").should be_disabled
<span class="linenum">238</span> end
<span class="linenum">239</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('13.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the checkbox button doesn't exist</span></dd>
<script type="text/javascript">moveProgressBar('13.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises ObjectDisabledException if the checkbox is disabled</span>
<div class="failure" id="failure_48">
<div class="message"><pre>expected Watir::Exception::ObjectDisabledException but nothing was raised</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:246:</pre></div>
<pre class="ruby"><code><span class="linenum">244</span>
<span class="linenum">245</span> it "raises ObjectDisabledException if the checkbox is disabled" do
<span class="offending"><span class="linenum">246</span> lambda { browser.checkbox(:id, "new_user_interests_dentistry").set }.should raise_error(ObjectDisabledException)</span>
<span class="linenum">247</span> lambda { browser.checkbox(:xpath, "//input[@id='new_user_interests_dentistry']").set }.should raise_error(ObjectDisabledException )
<span class="linenum">248</span> end
<span class="linenum">249</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_56">CheckBox#set?</dt>
<script type="text/javascript">makeRed('example_group_56');</script>
<script type="text/javascript">moveProgressBar('13.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the checkbox button is set</span>
<div class="failure" id="failure_49">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x113057df0&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:255:</pre></div>
<pre class="ruby"><code><span class="linenum">253</span> describe '#set?' do
<span class="linenum">254</span> it "returns true if the checkbox button is set" do
<span class="offending"><span class="linenum">255</span> browser.checkbox(:id, "new_user_interests_books").should be_set</span>
<span class="linenum">256</span> end
<span class="linenum">257</span>
<span class="linenum">258</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('14.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns false if the checkbox button unset</span>
<div class="failure" id="failure_50">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x11303def0&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:259:</pre></div>
<pre class="ruby"><code><span class="linenum">257</span>
<span class="linenum">258</span> it "returns false if the checkbox button unset" do
<span class="offending"><span class="linenum">259</span> browser.checkbox(:id, "new_user_interests_cars").should_not be_set</span>
<span class="linenum">260</span> end
<span class="linenum">261</span>
<span class="linenum">262</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('14.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the state for checkboxs with string values</span>
<div class="failure" id="failure_51">
<div class="message"><pre>undefined method `set?' for #&lt;Watir::Container::Checkbox:0x1130257d8&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:263:</pre></div>
<pre class="ruby"><code><span class="linenum">261</span>
<span class="linenum">262</span> it "returns the state for checkboxs with string values" do
<span class="offending"><span class="linenum">263</span> browser.checkbox(:name, "new_user_interests", 'cars').should_not be_set</span>
<span class="linenum">264</span> browser.checkbox(:name, "new_user_interests", 'cars').set
<span class="linenum">265</span> browser.checkbox(:name, "new_user_interests", 'cars').should be_set
<span class="linenum">266</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('14.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the checkbox button doesn't exist</span>
<div class="failure" id="failure_52">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `set?' for #&lt;Watir::Container::Checkbox:0x11300dc00&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/checkbox_spec.rb:271:</pre></div>
<pre class="ruby"><code><span class="linenum">269</span>
<span class="linenum">270</span> it "raises UnknownObjectException if the checkbox button doesn't exist" do
<span class="offending"><span class="linenum">271</span> lambda { browser.checkbox(:id, "no_such_id").set? }.should raise_error(UnknownObjectException)</span>
<span class="linenum">272</span> lambda { browser.checkbox(:xpath, "//input[@id='no_such_id']").set? }.should raise_error(UnknownObjectException)
<span class="linenum">273</span> end
<span class="linenum">274</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_57">CheckBoxes#length</dt>
<script type="text/javascript">moveProgressBar('14.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the number of checkboxes</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_58">CheckBoxes#[]</dt>
<script type="text/javascript">moveProgressBar('14.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the checkbox at the given index</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_59">CheckBoxes#each</dt>
<script type="text/javascript">moveProgressBar('14.6');</script>
<dd class="spec passed"><span class="passed_spec_name">iterates through checkboxes correctly</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_60">Dd#exists?</dt>
<script type="text/javascript">moveProgressBar('14.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('14.8');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the element does not exist</span></dd>
<script type="text/javascript">moveProgressBar('14.9');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('15.0');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_61">Dd#class_name</dt>
<script type="text/javascript">moveProgressBar('15.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the class attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('15.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('15.3');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_62">Dd#id</dt>
<script type="text/javascript">moveProgressBar('15.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the id attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('15.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists, but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('15.7');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_63">Dd#title</dt>
<script type="text/javascript">moveProgressBar('15.8');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the title of the element</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_64">Dd#text</dt>
<script type="text/javascript">moveProgressBar('15.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the text of the element</span></dd>
<script type="text/javascript">moveProgressBar('16.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but contains no text</span></dd>
<script type="text/javascript">moveProgressBar('16.1');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_65">Dd#respond_to?</dt>
<script type="text/javascript">makeRed('example_group_65');</script>
<script type="text/javascript">moveProgressBar('16.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true for all attribute methods</span>
<div class="failure" id="failure_53">
<div class="message"><pre>expected #&lt;Watir::Container::Dd:0x112f6f1b8 @how=:index, @parent=#&lt;Watir::Safari:0x1017a4e30 @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;&gt;, @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;, @what=1&gt; to respond to :style</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dd_spec.rb:93:</pre></div>
<pre class="ruby"><code><span class="linenum">91</span> browser.dd(:index, 1).should respond_to(:id)
<span class="linenum">92</span> browser.dd(:index, 1).should respond_to(:class_name)
<span class="offending"><span class="linenum">93</span> browser.dd(:index, 1).should respond_to(:style)</span>
<span class="linenum">94</span> browser.dd(:index, 1).should respond_to(:text)
<span class="linenum">95</span> browser.dd(:index, 1).should respond_to(:title)
<span class="linenum">96</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_66">Dd#click</dt>
<script type="text/javascript">moveProgressBar('16.3');</script>
<dd class="spec passed"><span class="passed_spec_name">fires events when clicked</span></dd>
<script type="text/javascript">moveProgressBar('16.4');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_67">Dd#html</dt>
<script type="text/javascript">moveProgressBar('16.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the HTML of the element</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_68">Dd#to_s</dt>
<script type="text/javascript">makeRed('example_group_68');</script>
<script type="text/javascript">moveProgressBar('16.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns a human readable representation of the element</span>
<div class="failure" id="failure_54">
<div class="message"><pre>expected: &quot;tag: dd\n id: someone\n class: name\n title: someone\n text: John Doe&quot;,
got: &quot;#&lt;Watir::Container::Dd:0x112f4f098&gt;&quot; (using ==)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dd_spec.rb:131:</pre></div>
<pre class="ruby"><code><span class="linenum">129</span> class: name
<span class="linenum">130</span> title: someone
<span class="offending"><span class="linenum">131</span> text: John Doe}</span>
<span class="linenum">132</span> end
<span class="linenum">133</span> end
<span class="linenum">134</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_69">Dds#length</dt>
<script type="text/javascript">moveProgressBar('16.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the number of dds</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_70">Dds#[]</dt>
<script type="text/javascript">moveProgressBar('16.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the dd at the given index</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_71">Dds#each</dt>
<script type="text/javascript">moveProgressBar('17.0');</script>
<dd class="spec passed"><span class="passed_spec_name">iterates through dds correctly</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_72">Div#exists?</dt>
<script type="text/javascript">moveProgressBar('17.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the element exists</span></dd>
<script type="text/javascript">makeRed('example_group_72');</script>
<script type="text/javascript">moveProgressBar('17.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the element exists (default how = :id)</span>
<div class="failure" id="failure_55">
<div class="message"><pre>wrong number of arguments (1 for 2)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:26:in `div'
/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:26:</pre></div>
<pre class="ruby"><code><span class="linenum">24</span>
<span class="linenum">25</span> it "returns true if the element exists (default how = :id)" do
<span class="offending"><span class="linenum">26</span> browser.div("header").should exist</span>
<span class="linenum">27</span> end
<span class="linenum">28</span>
<span class="linenum">29</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('17.3');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the element does not exist</span></dd>
<script type="text/javascript">moveProgressBar('17.4');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('17.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_73">Div#class_name</dt>
<script type="text/javascript">moveProgressBar('17.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the class attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('17.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('17.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_74">Div#id</dt>
<script type="text/javascript">moveProgressBar('17.9');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the id attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('18.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists, but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('18.2');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
<script type="text/javascript">makeRed('example_group_74');</script>
<script type="text/javascript">moveProgressBar('18.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">should take all conditions into account when locating by id</span>
<div class="failure" id="failure_56">
<div class="message"><pre>wrong number of arguments (1 for 2)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:92:in `div'
/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:92:</pre></div>
<pre class="ruby"><code><span class="linenum">90</span> it "should take all conditions into account when locating by id" do
<span class="linenum">91</span> browser.goto WatirSpec.files + "/multiple_ids.html"
<span class="offending"><span class="linenum">92</span> browser.div(:id => "multiple", :class => "bar").class_name.should == "bar"</span>
<span class="linenum">93</span> end
<span class="linenum">94</span> end
<span class="linenum">95</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_75">Div#name</dt>
<script type="text/javascript">moveProgressBar('18.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the name attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('18.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('18.6');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_76">Div#style</dt>
<script type="text/javascript">makeRed('example_group_76');</script>
<script type="text/javascript">moveProgressBar('18.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the style attribute if the element exists</span>
<div class="failure" id="failure_57">
<div class="message"><pre>undefined method `style' for #&lt;Watir::Container::Div:0x1131de868&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:115:</pre></div>
<pre class="ruby"><code><span class="linenum">113</span> not_compliant_on :watir do
<span class="linenum">114</span> it "returns the style attribute if the element exists" do
<span class="offending"><span class="linenum">115</span> browser.div(:id, 'best_language').style.should == "color: red; text-decoration: underline; cursor: pointer;"</span>
<span class="linenum">116</span> end
<span class="linenum">117</span> end
<span class="linenum">118</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('18.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists but the attribute doesn't</span>
<div class="failure" id="failure_58">
<div class="message"><pre>undefined method `style' for #&lt;Watir::Container::Div:0x1131d1730&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:129:</pre></div>
<pre class="ruby"><code><span class="linenum">127</span>
<span class="linenum">128</span> it "returns an empty string if the element exists but the attribute doesn't" do
<span class="offending"><span class="linenum">129</span> browser.div(:id, 'promo').style.should == ""</span>
<span class="linenum">130</span> end
<span class="linenum">131</span>
<span class="linenum">132</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('18.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the element does not exist</span>
<div class="failure" id="failure_59">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `style' for #&lt;Watir::Container::Div:0x1131b1a48&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:133:</pre></div>
<pre class="ruby"><code><span class="linenum">131</span>
<span class="linenum">132</span> it "raises UnknownObjectException if the element does not exist" do
<span class="offending"><span class="linenum">133</span> lambda {browser.div(:id, "no_such_id").style }.should raise_error(UnknownObjectException)</span>
<span class="linenum">134</span> end
<span class="linenum">135</span> end
<span class="linenum">136</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_77">Div#text</dt>
<script type="text/javascript">moveProgressBar('19.0');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the text of the div</span></dd>
<script type="text/javascript">moveProgressBar('19.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but contains no text</span></dd>
<script type="text/javascript">moveProgressBar('19.2');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_78">Div#value</dt>
<script type="text/javascript">makeRed('example_group_78');</script>
<script type="text/javascript">moveProgressBar('19.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the value attribute if the element exists</span>
<div class="failure" id="failure_60">
<div class="message"><pre>expected: &quot;invalid_attribute&quot;,
got: :missing_value (using ==)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:164:</pre></div>
<pre class="ruby"><code><span class="linenum">162</span> describe "#value" do
<span class="linenum">163</span> it "returns the value attribute if the element exists" do
<span class="offending"><span class="linenum">164</span> browser.div(:id, 'promo').value.should == "invalid_attribute"</span>
<span class="linenum">165</span> end
<span class="linenum">166</span>
<span class="linenum">167</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('19.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists but the attribute doesn't</span>
<div class="failure" id="failure_61">
<div class="message"><pre>expected: &quot;&quot;,
got: :missing_value (using ==)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:168:</pre></div>
<pre class="ruby"><code><span class="linenum">166</span>
<span class="linenum">167</span> it "returns an empty string if the element exists but the attribute doesn't" do
<span class="offending"><span class="linenum">168</span> browser.div(:index, 1).value.should == ""</span>
<span class="linenum">169</span> end
<span class="linenum">170</span>
<span class="linenum">171</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('19.6');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_79">Div#respond_to?</dt>
<script type="text/javascript">makeRed('example_group_79');</script>
<script type="text/javascript">moveProgressBar('19.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true for all attribute methods</span>
<div class="failure" id="failure_62">
<div class="message"><pre>expected #&lt;Watir::Container::Div:0x1131404d8 @how=:index, @parent=#&lt;Watir::Safari:0x1017a4e30 @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;&gt;, @scripter=#&lt;Watir::AppleScripter:0x1017a4020 @typing_lag=0.08, @js=#&lt;Watir::JavaScripter:0x1017a4340&gt;, @document=app(&quot;/Applications/Safari.app&quot;).documents[1], @element=nil, @app=app(&quot;/Applications/Safari.app&quot;), @appname=&quot;Safari&quot;&gt;, @what=1&gt; to respond to :style</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:183:</pre></div>
<pre class="ruby"><code><span class="linenum">181</span> browser.div(:index, 1).should respond_to(:id)
<span class="linenum">182</span> browser.div(:index, 1).should respond_to(:name)
<span class="offending"><span class="linenum">183</span> browser.div(:index, 1).should respond_to(:style)</span>
<span class="linenum">184</span> browser.div(:index, 1).should respond_to(:text)
<span class="linenum">185</span> browser.div(:index, 1).should respond_to(:value)
<span class="linenum">186</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_80">Div#click</dt>
<script type="text/javascript">moveProgressBar('19.8');</script>
<dd class="spec passed"><span class="passed_spec_name">fires events when clicked</span></dd>
<script type="text/javascript">moveProgressBar('19.9');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_81">Div#double_click</dt>
<script type="text/javascript">makeRed('example_group_81');</script>
<script type="text/javascript">moveProgressBar('20.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">fires the ondblclick event</span>
<div class="failure" id="failure_63">
<div class="message"><pre>undefined method `double_click' for #&lt;Watir::Container::Div:0x11310ca20&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:208:</pre></div>
<pre class="ruby"><code><span class="linenum">206</span> describe "#double_click" do
<span class="linenum">207</span> it "fires the ondblclick event" do
<span class="offending"><span class="linenum">208</span> browser.div(:id, 'html_test').double_click</span>
<span class="linenum">209</span> messages.should include('double clicked')
<span class="linenum">210</span> end
<span class="linenum">211</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_82">Div#right_click</dt>
<script type="text/javascript">makeRed('example_group_82');</script>
<script type="text/javascript">moveProgressBar('20.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">fires the oncontextmenu event</span>
<div class="failure" id="failure_64">
<div class="message"><pre>undefined method `right_click' for #&lt;Watir::Container::Div:0x1130f6428&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:216:</pre></div>
<pre class="ruby"><code><span class="linenum">214</span> it "fires the oncontextmenu event" do
<span class="linenum">215</span> browser.goto(WatirSpec.files + "/right_click.html")
<span class="offending"><span class="linenum">216</span> browser.div(:id, "click").right_click</span>
<span class="linenum">217</span> messages.first.should == 'right-clicked'
<span class="linenum">218</span> end
<span class="linenum">219</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_83">Div#html</dt>
<script type="text/javascript">makeRed('example_group_83');</script>
<script type="text/javascript">moveProgressBar('20.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the HTML of the element</span>
<div class="failure" id="failure_65">
<div class="message"><pre>expected &quot;\n &lt;span class=\&quot;footer\&quot; name=\&quot;footer\&quot; onclick=\&quot;this.innerHTML = 'This is a footer with text set by Javascript.'\&quot;&gt;This is a footer.&lt;/span&gt;\n &quot; to include &quot;&lt;div id=\&quot;footer\&quot; title=\&quot;Closing remarks\&quot; class=\&quot;profile\&quot;&gt;&quot;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:225:</pre></div>
<pre class="ruby"><code><span class="linenum">223</span> it "returns the HTML of the element" do
<span class="linenum">224</span> html = browser.div(:id, 'footer').html
<span class="offending"><span class="linenum">225</span> html.should include('<div id="footer" title="Closing remarks" class="profile">')</span>
<span class="linenum">226</span> html.should include('This is a footer.')
<span class="linenum">227</span> html.should_not include('<div id="content">')
<span class="linenum">228</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_84">Div#to_s</dt>
<script type="text/javascript">makeRed('example_group_84');</script>
<script type="text/javascript">moveProgressBar('20.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns a human readable representation of the element</span>
<div class="failure" id="failure_66">
<div class="message"><pre>expected: &quot;tag: div\n id: footer\n title: Closing remarks\n class: profile\n text: This is a footer.&quot;,
got: &quot;#&lt;Watir::Container::Div:0x1130c4ec8&gt;&quot; (using ==)</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/div_spec.rb:240:</pre></div>
<pre class="ruby"><code><span class="linenum">238</span> title: Closing remarks
<span class="linenum">239</span> class: profile
<span class="offending"><span class="linenum">240</span> text: This is a footer.}</span>
<span class="linenum">241</span> end
<span class="linenum">242</span> end
<span class="linenum">243</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_85">Divs#length</dt>
<script type="text/javascript">moveProgressBar('20.4');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the number of divs</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_86">Divs#[]</dt>
<script type="text/javascript">moveProgressBar('20.5');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the div at the given index</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_87">Divs#each</dt>
<script type="text/javascript">moveProgressBar('20.6');</script>
<dd class="spec passed"><span class="passed_spec_name">iterates through divs correctly</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_88">Dl#exists?</dt>
<script type="text/javascript">makeRed('example_group_88');</script>
<script type="text/javascript">moveProgressBar('20.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true if the element exists</span>
<div class="failure" id="failure_67">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:13:</pre></div>
<pre class="ruby"><code><span class="linenum">11</span> describe "#exists?" do
<span class="linenum">12</span> it "returns true if the element exists" do
<span class="offending"><span class="linenum">13</span> browser.dl(:id, "experience-list").should exist</span>
<span class="linenum">14</span> browser.dl(:class, "list").should exist
<span class="linenum">15</span> browser.dl(:xpath, "//dl[@id='experience-list']").should exist
<span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('20.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns false if the element does not exist</span>
<div class="failure" id="failure_68">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:20:</pre></div>
<pre class="ruby"><code><span class="linenum">18</span>
<span class="linenum">19</span> it "returns false if the element does not exist" do
<span class="offending"><span class="linenum">20</span> browser.dl(:id, "no_such_id").should_not exist</span>
<span class="linenum">21</span> end
<span class="linenum">22</span>
<span class="linenum">23</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises TypeError when 'what' argument is invalid</span>
<div class="failure" id="failure_69">
<div class="message"><pre>expected TypeError, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:24:</pre></div>
<pre class="ruby"><code><span class="linenum">22</span>
<span class="linenum">23</span> it "raises TypeError when 'what' argument is invalid" do
<span class="offending"><span class="linenum">24</span> lambda { browser.dl(:id, 3.14).exists? }.should raise_error(TypeError)</span>
<span class="linenum">25</span> end
<span class="linenum">26</span>
<span class="linenum">27</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span>
<div class="failure" id="failure_70">
<div class="message"><pre>expected Watir::Exception::MissingWayOfFindingObjectException, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:28:</pre></div>
<pre class="ruby"><code><span class="linenum">26</span>
<span class="linenum">27</span> it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
<span class="offending"><span class="linenum">28</span> lambda { browser.dl(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)</span>
<span class="linenum">29</span> end
<span class="linenum">30</span> end
<span class="linenum">31</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_89">Dl#class_name</dt>
<script type="text/javascript">makeRed('example_group_89');</script>
<script type="text/javascript">moveProgressBar('21.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the class attribute if the element exists</span>
<div class="failure" id="failure_71">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:35:</pre></div>
<pre class="ruby"><code><span class="linenum">33</span> describe "#class_name" do
<span class="linenum">34</span> it "returns the class attribute if the element exists" do
<span class="offending"><span class="linenum">35</span> browser.dl(:id , "experience-list").class_name.should == "list"</span>
<span class="linenum">36</span> end
<span class="linenum">37</span>
<span class="linenum">38</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists but the attribute doesn't</span>
<div class="failure" id="failure_72">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:39:</pre></div>
<pre class="ruby"><code><span class="linenum">37</span>
<span class="linenum">38</span> it "returns an empty string if the element exists but the attribute doesn't" do
<span class="offending"><span class="linenum">39</span> browser.dl(:id , "noop").class_name.should == ""</span>
<span class="linenum">40</span> end
<span class="linenum">41</span>
<span class="linenum">42</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the element does not exist</span>
<div class="failure" id="failure_73">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:43:</pre></div>
<pre class="ruby"><code><span class="linenum">41</span>
<span class="linenum">42</span> it "raises UnknownObjectException if the element does not exist" do
<span class="offending"><span class="linenum">43</span> lambda { browser.dl(:id, "no_such_id").class_name }.should raise_error(UnknownObjectException)</span>
<span class="linenum">44</span> lambda { browser.dl(:title, "no_such_title").class_name }.should raise_error(UnknownObjectException)
<span class="linenum">45</span> lambda { browser.dl(:index, 1337).class_name }.should raise_error(UnknownObjectException)
<span class="linenum">46</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_90">Dl#id</dt>
<script type="text/javascript">makeRed('example_group_90');</script>
<script type="text/javascript">moveProgressBar('21.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the id attribute if the element exists</span>
<div class="failure" id="failure_74">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:52:</pre></div>
<pre class="ruby"><code><span class="linenum">50</span> describe "#id" do
<span class="linenum">51</span> it "returns the id attribute if the element exists" do
<span class="offending"><span class="linenum">52</span> browser.dl(:class, 'list').id.should == "experience-list"</span>
<span class="linenum">53</span> end
<span class="linenum">54</span>
<span class="linenum">55</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists, but the attribute doesn't</span>
<div class="failure" id="failure_75">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:56:</pre></div>
<pre class="ruby"><code><span class="linenum">54</span>
<span class="linenum">55</span> it "returns an empty string if the element exists, but the attribute doesn't" do
<span class="offending"><span class="linenum">56</span> browser.dl(:class, 'personalia').id.should == ""</span>
<span class="linenum">57</span> end
<span class="linenum">58</span>
<span class="linenum">59</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('21.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the element does not exist</span>
<div class="failure" id="failure_76">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:60:</pre></div>
<pre class="ruby"><code><span class="linenum">58</span>
<span class="linenum">59</span> it "raises UnknownObjectException if the element does not exist" do
<span class="offending"><span class="linenum">60</span> lambda {browser.dl(:id, "no_such_id").id }.should raise_error(UnknownObjectException)</span>
<span class="linenum">61</span> lambda {browser.dl(:title, "no_such_id").id }.should raise_error(UnknownObjectException)
<span class="linenum">62</span> lambda {browser.dl(:index, 1337).id }.should raise_error(UnknownObjectException)
<span class="linenum">63</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_91">Dl#title</dt>
<script type="text/javascript">makeRed('example_group_91');</script>
<script type="text/javascript">moveProgressBar('21.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the id attribute if the element exists</span>
<div class="failure" id="failure_77">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:68:</pre></div>
<pre class="ruby"><code><span class="linenum">66</span> describe "#title" do
<span class="linenum">67</span> it "returns the id attribute if the element exists" do
<span class="offending"><span class="linenum">68</span> browser.dl(:class, 'list').title.should == "experience"</span>
<span class="linenum">69</span> end
<span class="linenum">70</span> end
<span class="linenum">71</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_92">Dl#text</dt>
<script type="text/javascript">makeRed('example_group_92');</script>
<script type="text/javascript">moveProgressBar('21.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the text of the element</span>
<div class="failure" id="failure_78">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:74:</pre></div>
<pre class="ruby"><code><span class="linenum">72</span> describe "#text" do
<span class="linenum">73</span> it "returns the text of the element" do
<span class="offending"><span class="linenum">74</span> browser.dl(:id, "experience-list").text.should include("11 years")</span>
<span class="linenum">75</span> end
<span class="linenum">76</span>
<span class="linenum">77</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('22.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns an empty string if the element exists but contains no text</span>
<div class="failure" id="failure_79">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:78:</pre></div>
<pre class="ruby"><code><span class="linenum">76</span>
<span class="linenum">77</span> it "returns an empty string if the element exists but contains no text" do
<span class="offending"><span class="linenum">78</span> browser.dl(:id, 'noop').text.should == ""</span>
<span class="linenum">79</span> end
<span class="linenum">80</span>
<span class="linenum">81</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('22.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the element does not exist</span>
<div class="failure" id="failure_80">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:82:</pre></div>
<pre class="ruby"><code><span class="linenum">80</span>
<span class="linenum">81</span> it "raises UnknownObjectException if the element does not exist" do
<span class="offending"><span class="linenum">82</span> lambda { browser.dl(:id, "no_such_id").text }.should raise_error(UnknownObjectException)</span>
<span class="linenum">83</span> lambda { browser.dl(:title, "no_such_title").text }.should raise_error(UnknownObjectException)
<span class="linenum">84</span> lambda { browser.dl(:index, 1337).text }.should raise_error(UnknownObjectException)
<span class="linenum">85</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_93">Dl#respond_to?</dt>
<script type="text/javascript">makeRed('example_group_93');</script>
<script type="text/javascript">moveProgressBar('22.3');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns true for all attribute methods</span>
<div class="failure" id="failure_81">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:91:</pre></div>
<pre class="ruby"><code><span class="linenum">89</span> describe "#respond_to?" do
<span class="linenum">90</span> it "returns true for all attribute methods" do
<span class="offending"><span class="linenum">91</span> browser.dl(:index, 1).should respond_to(:id)</span>
<span class="linenum">92</span> browser.dl(:index, 1).should respond_to(:class_name)
<span class="linenum">93</span> browser.dl(:index, 1).should respond_to(:style)
<span class="linenum">94</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_94">Dl#click</dt>
<script type="text/javascript">makeRed('example_group_94');</script>
<script type="text/javascript">moveProgressBar('22.4');</script>
<dd class="spec failed">
<span class="failed_spec_name">fires events when clicked</span>
<div class="failure" id="failure_82">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:102:</pre></div>
<pre class="ruby"><code><span class="linenum">100</span> describe "#click" do
<span class="linenum">101</span> it "fires events when clicked" do
<span class="offending"><span class="linenum">102</span> browser.dl(:id, 'noop').text.should_not == 'noop'</span>
<span class="linenum">103</span> browser.dl(:id, 'noop').click
<span class="linenum">104</span> browser.dl(:id, 'noop').text.should == 'noop'
<span class="linenum">105</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('22.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">raises UnknownObjectException if the element does not exist</span>
<div class="failure" id="failure_83">
<div class="message"><pre>expected Watir::Exception::UnknownObjectException, got #&lt;NoMethodError: undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:108:</pre></div>
<pre class="ruby"><code><span class="linenum">106</span>
<span class="linenum">107</span> it "raises UnknownObjectException if the element does not exist" do
<span class="offending"><span class="linenum">108</span> lambda { browser.dl(:id, "no_such_id").click }.should raise_error(UnknownObjectException)</span>
<span class="linenum">109</span> lambda { browser.dl(:title, "no_such_title").click }.should raise_error(UnknownObjectException)
<span class="linenum">110</span> lambda { browser.dl(:index, 1337).click }.should raise_error(UnknownObjectException)
<span class="linenum">111</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_95">Dl#html</dt>
<script type="text/javascript">makeRed('example_group_95');</script>
<script type="text/javascript">moveProgressBar('22.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the HTML of the element</span>
<div class="failure" id="failure_84">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:117:</pre></div>
<pre class="ruby"><code><span class="linenum">115</span> describe "#html" do
<span class="linenum">116</span> it "returns the HTML of the element" do
<span class="offending"><span class="linenum">117</span> html = browser.dl(:id, 'experience-list').html</span>
<span class="linenum">118</span> html.should include('<dt class="current-industry">')
<span class="linenum">119</span> html.should_not include('</body>')
<span class="linenum">120</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_96">Dl#to_s</dt>
<script type="text/javascript">makeRed('example_group_96');</script>
<script type="text/javascript">moveProgressBar('22.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns a human readable representation of the element</span>
<div class="failure" id="failure_85">
<div class="message"><pre>undefined method `dl' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dl_spec.rb:126:</pre></div>
<pre class="ruby"><code><span class="linenum">124</span> bug "WTR-350", :watir do
<span class="linenum">125</span> it "returns a human readable representation of the element" do
<span class="offending"><span class="linenum">126</span> browser.dl(:id, 'experience-list').to_s.should ==</span>
<span class="linenum">127</span>%q{tag: dl
<span class="linenum">128</span> id: experience-list
<span class="linenum">129</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_97">Dls#length</dt>
<script type="text/javascript">makeRed('example_group_97');</script>
<script type="text/javascript">moveProgressBar('22.8');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the number of dls</span>
<div class="failure" id="failure_86">
<div class="message"><pre>undefined method `dls' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dls_spec.rb:12:</pre></div>
<pre class="ruby"><code><span class="linenum">10</span> describe "#length" do
<span class="linenum">11</span> it "returns the number of dls" do
<span class="offending"><span class="linenum">12</span> browser.dls.length.should == 3</span>
<span class="linenum">13</span> end
<span class="linenum">14</span> end
<span class="linenum">15</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_98">Dls#[]</dt>
<script type="text/javascript">makeRed('example_group_98');</script>
<script type="text/javascript">moveProgressBar('22.9');</script>
<dd class="spec failed">
<span class="failed_spec_name">returns the dl at the given index</span>
<div class="failure" id="failure_87">
<div class="message"><pre>undefined method `dls' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dls_spec.rb:18:</pre></div>
<pre class="ruby"><code><span class="linenum">16</span> describe "#[]" do
<span class="linenum">17</span> it "returns the dl at the given index" do
<span class="offending"><span class="linenum">18</span> browser.dls[1].id.should == "experience-list"</span>
<span class="linenum">19</span> end
<span class="linenum">20</span> end
<span class="linenum">21</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_99">Dls#each</dt>
<script type="text/javascript">makeRed('example_group_99');</script>
<script type="text/javascript">moveProgressBar('23.0');</script>
<dd class="spec failed">
<span class="failed_spec_name">iterates through dls correctly</span>
<div class="failure" id="failure_88">
<div class="message"><pre>undefined method `dls' for #&lt;Watir::Safari:0x1017a4e30&gt;</pre></div>
<div class="backtrace"><pre>/Users/james/proj/safariwatir/spec/watirspec/dls_spec.rb:24:</pre></div>
<pre class="ruby"><code><span class="linenum">22</span> describe "#each" do
<span class="linenum">23</span> it "iterates through dls correctly" do
<span class="offending"><span class="linenum">24</span> browser.dls.each_with_index do |d, index|</span>
<span class="linenum">25</span> d.text.should == browser.dl(:index, index+1).text
<span class="linenum">26</span> d.id.should == browser.dl(:index, index+1).id
<span class="linenum">27</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_100">Dt#exists?</dt>
<script type="text/javascript">moveProgressBar('23.1');</script>
<dd class="spec passed"><span class="passed_spec_name">returns true if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('23.2');</script>
<dd class="spec passed"><span class="passed_spec_name">returns false if the element does not exist</span></dd>
<script type="text/javascript">moveProgressBar('23.4');</script>
<dd class="spec passed"><span class="passed_spec_name">raises TypeError when 'what' argument is invalid</span></dd>
<script type="text/javascript">moveProgressBar('23.5');</script>
<dd class="spec passed"><span class="passed_spec_name">raises MissingWayOfFindingObjectException when 'how' argument is invalid</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_101">Dt#class_name</dt>
<script type="text/javascript">moveProgressBar('23.6');</script>
<dd class="spec passed"><span class="passed_spec_name">returns the class attribute if the element exists</span></dd>
<script type="text/javascript">moveProgressBar('23.7');</script>
<dd class="spec passed"><span class="passed_spec_name">returns an empty string if the element exists but the attribute doesn't</span></dd>
<script type="text/javascript">moveProgressBar('23.8');</script>
<dd class="spec passed"><span class="passed_spec_name">raises UnknownObjectException if the element does not exist</span></dd>
</dl>
</div>
<div class="example_group">
<dl>