title: Retrieve text from span element in watir webdriver
body: <p>I have the following:</p>
  
  <pre><code>&lt;ul class="a"&gt;
    &lt;li class="b"&gt;
      &lt;a class="c"&gt;
        &lt;span class="d"&gt;
          &lt;strong&gt;text&lt;/strong&gt;
        &lt;/span&gt;
      &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I'm trying to get the "text" from the span.</p>
  
  <p>When I try:</p>
  
  <pre><code>puts browser.ul( :class =&gt;'a').li( :class =&gt;'b').link(:class =&gt;'c').span(:class =&gt;'d')
  </code></pre>
  
  <p>I get the <code>span</code> element back. <code>#&lt;Watir::Span:0x007fa1d11edb18&gt;</code> as i should.</p>
  
  <p>But when trying: </p>
  
  <pre><code>puts browser.ul( :class =&gt;'a').li( :class =&gt;'b').link(:class =&gt;'c').span(:class =&gt;'d').text
  </code></pre>
  
  <p>im getting an error saying :</p>
  
  <pre><code>unable to locate element, using {:class=&gt;'b', :tag_name=&gt;"li"}
  </code></pre>
  
  <p>Any ideas ?</p>