title: Using Watir-webdriver : Getting the text of h1 tag
body: <p>I am working on Watir webdriver and I want to get text of the h1 tag of the page </p>
  
  <pre><code>&lt;body class="not-front not-logged-in page-node node-type-first-drive one-sidebar sidebar-right col-2 bp col-2 lightbox-processed" data-twttr-rendered="true"&gt;
  &lt;div class="container"&gt;
  &lt;div id="header"&gt;
  &lt;div class=""&gt;&lt;/div&gt;
  &lt;div class="col-center"&gt;
  &lt;h1&gt;New Page header&lt;/h1&gt;
  </code></pre>
  
  <p>The code that I am writing is </p>
  
  <pre><code>@title2 = @browser.h1.attribute_value "text"
      puts @title2
  </code></pre>
  
  <p>BUT the output that I am getting is Nil instead of "New Page header"</p>