title: how to get text present between html tags like <div>text</div> using selenium C#
body: <p>how to get text-'True' present between html tags <code>&lt;div&gt;text&lt;/div&gt;</code> using <code>selenium</code> <code>C#</code>.</p>
  
  <pre><code>&lt;div type='data' id='OfferInCart' style='display:none;'&gt;True&lt;/div&gt;
  </code></pre>
  
  <p>I have tried to get it using :</p>
  
  <pre><code>string status = OfferIncart.GetAttribute("text"); 
  </code></pre>
  
  <p>and also with : </p>
  
  <pre><code>string status = OfferIncart.GetAttribute("div"); 
  </code></pre>
  
  <p>but not getting the text. I even using <code>javascript</code> with below code : </p>
  
  <pre><code>string status = (String)((IJavaScriptExecutor)browser).ExecuteScript("return arguments[0].innerHTML", OfferIncart); 
  </code></pre>
  
  <p>still my code is not working.</p>
  
  <p>Want to check for the value whether <code>TRUE/False</code> of above line of code using <code>C#</code> <code>Selenium</code>. Please suggest</p>