title: How to get text of <label> tag with webdriver librairy of python
body: <p>I am working with the following html structure :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table id="campaignSPTree_id"&gt;
    &lt;tbody&gt;
      &lt;tr&gt;...&lt;/tr&gt;
      &lt;tr&gt;
        &lt;td id="r1r0c0"&gt;
          &lt;a&gt;
            &lt;span&gt;
                  &lt;label class="hidden-label"&gt;Tree level 1, 1 of 25. &lt;/label&gt;
                &lt;/span&gt;
          &lt;/a &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would like to retrieve the text of the <code>&lt;label&gt;</code> tag. I have tried this code but it doesn't work :</p>
  
  <pre><code>    maxPP = browser.find_elements_by_xpath("//table[@id='campaignSPTree_id']/tbody/tr[2]/td/a/span/label").get_attribute("class").text
  </code></pre>
  
  <p>I don't understand why I get the error:</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'get_attribute'
  </code></pre>
  
  <p>Could you, please, help me to get this famous text ?</p>
  
  <p>Best regards</p>