title: scrape sector and industry form morningstar
body: <p>I want to scrape the Sector and Industry from Morningstar page. I can see the data and the Watir is also seeing it. But when I try to grab the div it does not return anything.</p>
  
  <pre><code>   irb(main):001:0&gt; require 'watir'
  =&gt; true
  
  irb(main):008:0&gt; browser= Watir::Browser.new
  
  DevTools listening on ws://127.0.0.1:49780/devtools/browser/4e473d9e-4818-45ad-8238-587bc931099a
  =&gt; #&lt;Watir::Browser:0x..f0e9773de url="data:," title=""&gt;
  irb(main):006:0&gt; path="http://quote.morningstar.ca/Quicktakes/stock/stock_beta.aspx?t=GOOG&amp;region=USA&amp;culture=en-CA"
  =&gt; "http://quote.morningstar.ca/Quicktakes/stock/stock_beta.aspx?t=GOOG&amp;region=USA&amp;culture=en-CA"
  irb(main):007:0&gt; goto(path)
  irb(main):009:0&gt; browser.goto(path)
  [41088:42292:1007/225520.743:ERROR:platform_sensor_reader_win.cc(242)] NOT IMPLEMENTED
  =&gt; "http://quote.morningstar.ca/Quicktakes/stock/stock_beta.aspx?t=GOOG&amp;region=USA&amp;culture=en-CA"
  irb(main):010:0&gt; browser.text.include?"Sector"  #### CAN FIND THE word sector.
  =&gt; true
  irb(main):011:0&gt; browser.div(:class=&gt;"sal-dp-panel")  ##### it cannot find the class at all.
  =&gt; #&lt;Watir::Div: located: false; {:class=&gt;"sal-dp-panel", :tag_name=&gt;"div"}&gt;
      irb(main):015:0&gt; divs=browser.divs(:class=&gt;"sal-dp-panel")
  =&gt; #&lt;Watir::DivCollection:0x000000079722d0 @query_scope=#&lt;Watir::Browser:0xdbd2266a url="http://quote.morningstar.ca/Quicktakes/stock/stock_beta.aspx?t=GOOG&amp;region=USA&amp;culture=en-CA" title="GOOG 1157.35 -0.93 (Alphabet Inc Class C)"&gt;, @selector={:class=&gt;"sal-dp-panel", :tag_name=&gt;"div"}&gt;
  irb(main):018:0&gt; divs.count
  =&gt; 0
  irb(main):019:0&gt; divs.each{|div| puts div.text}
  =&gt; []
  irb(main):020:0&gt; divs.each{|div| puts "got one"}
  =&gt; []
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/e0BrE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e0BrE.png" alt="enter image description here"></a></p>