title: Given a (python) selenium WebElement can I get the innerText?
body: <p>The following</p>
  
  <pre><code>element = driver.execute_script("return $('.theelementclass')")[0]
  </code></pre>
  
  <p>find me my element (a div that ONLY contains some text), but:</p>
  
  <pre><code>element.text
  </code></pre>
  
  <p>returns an empty string (which is a surprise). From the Java script console:</p>
  
  <pre><code>$('.theelementclass').text  # also (consistently) empty
  $('.theelementclass').innerText  # YES! gets the div's text.
  </code></pre>
  
  <p>So, my question is, <strong>given that I have some WebElement</strong>, can I find the innerText? (For boring reasons, I want to operate with a found webelement, not the original query).</p>
  
  <p>I'm including the surrounding HTML. However, I don't think its useful (since element is found and is unique)</p>
  
  <pre><code>&lt;first-panel on-click="onClickLearnMore()" class="ng-isolate-scope"&gt;
    &lt;div class="comp-onboarding-first-thought-panel"&gt;
      &lt;div class="onboarding-text-container"&gt;
          &lt;div class="theelementclass"&gt;
                  Congratulations.
                  You found the text is here!
          &lt;/div&gt;
          &lt;div class="button-cont"&gt;
              &lt;div ng-click="onClickButton()"&gt;Learn more about The Thing&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/first-panel&gt;
  </code></pre>