title: Unable to scrape data from a particular webpage using Watir
body: <p>I've used Watir to successfully web scrape before, but I'm having trouble web scraping this particular web page.</p>
  
  <p><a href="https://kroger.softcoin.com/programs/kroger/digital_coupons/?banner=Smiths&amp;origin=DigitalCoupons" rel="nofollow noreferrer">https://kroger.softcoin.com/programs/kroger/digital_coupons/?banner=Smiths&amp;origin=DigitalCoupons</a></p>
  
  <p>When I visit the page on a regular browser, I can see the page reload itself two or three times every time and I'm thinking that's where the problem comes from.  I've tried using   </p>
  
  <pre><code>Watir::Wait.until { @browser.div(id: "offer-105653").visible? }
  </code></pre>
  
  <p>but that doesn't work.  I've successfully used the code above on other webpages as a test, but it doesn't seem to work for the Kroger website. I am not sure how to fix.</p>
  
  <pre><code>def save
      require 'watir'
      require 'phantomjs'
  
      @browser = Watir::Browser.new:phantomjs
      @browser.goto "https://kroger.softcoin.com/programs/kroger/digital_coupons/?banner=Smiths&amp;origin=DigitalCoupons"
      @browser.li(id: "1768173").wait_until(&amp;:present?).text
      @products = @browser.divs
      @products.each do |x|
          Smith.create(title: x.text) 
      end
  
  end
  </code></pre>