title: How to get text in span with xpath. selenium python
body: <p>Before asking, I find answer through google for 2hours. But there's no answer for me.</p>
  
  <p>I use selenium with python</p>
  
  <p>I apply below q/a answer to my code but nothing text printed.</p>
  
  <p><a href="https://stackoverflow.com/questions/4007413/xpath-query-to-get-nth-instance-of-an-element/4008925">XPath query to get nth instance of an element</a></p>
  
  <p><strong>What I want to get is "Can't select"</strong></p>
  
  <pre><code>&lt;li data-index="5" date="20190328" class="day dimmed"&gt;
      &lt;a href="#" onclick="return false;"&gt;
          &lt;span class="dayweek"&gt;Tuesday&lt;/span&gt;
          &lt;span class="day"&gt;28&lt;/span&gt;
          &lt;span class="sreader"&gt;Can't select&lt;/span&gt;
      &lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p><strong>I use xpath because I need to repeat</strong></p>
  
  <p><strong>I should do this. 
  The HTML code above is a simple change</strong></p>
  
  <pre><code>day_lists = driver.find_elements_by_xpath('//li')
  </code></pre>
  
  <p><strong>Nothing printed and there's no error</strong></p>
  
  <pre><code>for day_list in day_lists:
      print(day_list.find_element_by_xpath('//span[@class="sreader"]').text)
  </code></pre>
  
  <p>++++ 2019/3/24/16:45(+09:00)</p>
  
  <p><strong>When I test with below code</strong></p>
  
  <p><code>print(day_list.find_element_by_xpath('.//span[@class="sreader"]/text()'))</code></p>
  
  <p><strong>Error comes out. Why there's no such element?</strong></p>
  
  <pre><code>selenium.common.exceptions.NoSuchElementException: 
  Message: no such element: Unable to locate element: 
  {"method":"xpath","selector":".//span[@class="sreader"]/text()"}
  </code></pre>