title: How to finish searching for elements at watir?
body: <p>I should save all reviews from page <a href="https://www.walmart.com/ip/Ematic-9-Dual-Screen-Portable-DVD-Player-with-Dual-DVD-Players-ED929D/28806789" rel="nofollow noreferrer">https://www.walmart.com/ip/Ematic-9-Dual-Screen-Portable-DVD-Player-with-Dual-DVD-Players-ED929D/28806789</a>. For it I use Watir because it is dynamic page and I need to click button to update results. I check if button present and then scrape reviews.But when all reviews saved on last page, it don`t finish process and search for elements and after 30 seconds I have error.</p>
  
  <p>Error:</p>
  
  <pre><code>Watir::Exception::UnknownObjectException (timed out after 30 seconds, waiting for #&lt;Watir::Div: located: false; {:css=&gt;".review-body-text", :index=&gt;10, :tag_name=&gt;:div}&gt; to be located; Maybe look in an iframe?):
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>while  browser.element(:text =&gt; "Next Page").present?
        browser.elements(css:'.review-body-text').each do |comment|
          review= Review.new
          review.text=comment.text
          product.reviews&lt;&lt;review
          review.save
        end
          browser.button(:text =&gt; "Next Page").click
      end while  browser.element(:text =&gt; "Next Page").present?
      browser.close
  </code></pre>