title: How to extract text from child Text Nodes - Selenium
body: <p>From the code below I would like to extract: "I give you €0.00.".</p>
  
  <p>With the following xpath I can target it from Developer tools: </p>
  
  <blockquote>
    <p>//*[@id="windowID"]/text()[2]</p>
  </blockquote>
  
  <p>But using Selenium I can only look for this element with <code>driver.findElement(By.Xpath(""))</code></p>
  
  <p>The problem is that it says that the result of xpath expression is not an element, but an [object Text]</p>
  
  <p>If I target only the ancestor div (windowID), then the whole text is received. I only want the mentioned part to be saved to a string.</p>
  
  <pre><code>&lt;div id="windowID" class="windowClass"&gt;"Your are awesome."&lt;br&gt;"I give you €0.00."&lt;br&gt;"But you should give me €0.00."&lt;br&gt;"Would you like to do that?"&lt;/div&gt;
  </code></pre>