title: getText(), JavascriptExecutor, innerText, textContent only returning null from a read only field
body: <p><strong>Critical UPDATE</strong>:
  <em>It appears that, when we reach the page by using Selenium, the read only fields never loads. It's a document.jsp page which loads. But when we reach the page manually, we get that data. I am using ChromeDriver. I think that explains why I am unable to retrieve the read only fields while using Selenium. If anyone knows of a work around, please let me know.</em> </p>
  
  <p><strong>UPDATE:</strong> <em>Since writing this question I have tried innerText again with CSS but it returns "<code>&amp;nbsp;</code>" instead of "Bronze". So it looks like I am able to retrieve something. But it's <code>&amp;nbsp;</code>. How can I get "Bronze"</em></p>
  
  <p>I am trying to retrieve the text from the field of a read only element using ChromDriver. Below is the HTML code. I want to retrieve the String "Bronze"</p>
  
  <pre><code>&lt;div class="column label-left" style="width:25%"&gt;
      &lt;div class="form-item clearfix null" id="attr_wrapper_1_offerType_t"&gt;
          &lt;label class="form-label" for="offerType_t" style="width: 130px"&gt;&lt;span style="padding-right: 5px"&gt;Offer Type:&lt;/span&gt;&lt;/label&gt;
          &lt;div class="form-element field-wrapper" id="field_wrapper_1_offerType_t" style="padding-left:130px"&gt;
              &lt;div class="field" message=""&gt;&lt;span class="readonly-wrapper" id="readonly_1_offerType_t"&gt;New Business&lt;/span&gt;&lt;/div&gt;
              &lt;div id="msg_1_offerType_t" class="error-hover" data-action-message="" message=""&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-item clearfix null" id="attr_wrapper_1_dealClass_t"&gt;
          &lt;label class="form-label" for="dealClass_t" style="width: 130px"&gt;&lt;span style="padding-right: 5px"&gt;Deal Class:&lt;/span&gt;&lt;/label&gt;
          &lt;div class="form-element field-wrapper" id="field_wrapper_1_dealClass_t" style="padding-left:130px"&gt;
              &lt;div class="field" message=""&gt;&lt;span class="readonly-wrapper" id="readonly_1_dealClass_t"&gt;Bronze&lt;/span&gt;&lt;/div&gt;
              &lt;div id="msg_1_dealClass_t" class="error-hover" data-action-message="" message=""&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-item clearfix attr-spacer" style="height: 25px;"&gt;&lt;/div&gt;
      &lt;div class="form-item clearfix attr-spacer" style="height: 25px;"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am using id="readonly_1_dealClass_t" but it returns null.<br>
  I have also tried xpath="//span[contains(@id,"dealClass")]". It returns null too.  </p>
  
  <p>First of all, <strong>getText()</strong> on id, xpath, CSS all of them returns null. Then I tried all the below options. </p>
  
  <p>I have also tried using <strong>JavascriptExecutor</strong> and retrieving the text(), but it doesn't help either.<br>
  I have also tried <strong>innerText</strong> and <strong>textContent</strong> for the above id but without success. 
  I have waits for 60 seconds until element is visible. It returns true. Which means its visible. But it just refuses to retrieve the string "Bronze".<br>
  I also tried getAttribute("value") too. Without success obviously.</p>
  
  <p>I also thought I could use the id="field_wrapper_1_dealClass_t" and use innerText on it. Still no success. That one just returns a lot of whitespace.</p>
  
  <p>What else can I try to retrieve the string "Bronze"? </p>
  
  <p>PS: I don't have issues with Firefox. Chrome just refuses to go ahead. And business need is to stick with only Chrome right now. So I have to get this working in Chrome. Please help.</p>
  
  <p>I hope I have been clear and I hope I have furnished enough HTML code.</p>
  
  <p><strong>UPDATE:</strong> 
  This returns [] for value, ie blank.</p>
  
  <pre><code>final String script = "return arguments[0].getAttribute('innerHTML')";
  
  WebElement randomRow = driver.findElement(By.xpath("(//div[@class='field']/span)[21]"));
  String value = (String) ((JavascriptExecutor) driver).executeScript(script, randomRow);
  </code></pre>
  
  <p><strong>UPDATE 2:</strong> </p>
  
  <p>This returns [ ] too:</p>
  
  <pre><code>String myText = new WebDriverWait(driver, 20).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[@class='readonly-wrapper' and starts-with(@id,'readonly_') and contains(@id,'_dealClass_t')]"))).getAttribute("innerHTML");
  </code></pre>