title: Get the text from multiple elements with the same class in Selenium for Python?
body: <p>I'm trying to scrape data from a page with JavaScript loaded content. For example, the content I want is in the following format:</p>
  
  <pre><code>&lt;span class="class"&gt;text&lt;/span&gt;
  ...
  &lt;span class="class"&gt;more text&lt;/span&gt;
  </code></pre>
  
  <p>I used the <code>find_element_by_xpath(//span[@class="class"]').text</code> function but it only returned the first instance of the specified class. Basically, I would want a list like <code>[text, more text]</code> etc. I found the <code>find_elements_by_xpath()</code> function, but the <code>.text</code> at the end results in an error <code>exceptions.AttributeError: 'list' object has no attribute 'text'</code>.</p>