Selenium Webdriver Python: I can't seem to locate all the text in a label tag
<pre><code>&lt;label class="control-label"&gt;
   Rental Charge:
   &lt;span class="required" ng-show="vm.rentalInfo.reason"&gt;* (Min of $30.00)&lt;/span&gt;
&lt;/label&gt;
</code></pre>

<p>I used </p>

<pre><code>driver.find_element_by_xpath("//label[@ class = 'control-label']/span[@class = 'required']").text 
</code></pre>

<p>and the only <code>text</code> I get back is the <code>asterisk *</code>, <code>(Min of $30.00)</code> is not displayed. 
Does anyone know why this is?</p>

<p>I am guessing this is a timing issue. <a href="http://selenium-python.readthedocs.io/waits.html#explicit-waits" rel="nofollow">Wait</a> for "$" to be present in element explicitly with <code>text_to_be_present_in_element</code> expected condition:</p>

<pre><code>from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

wait = WebDriverWait(driver, 10)
elm = wait.until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, 'span[ng-show*="rentalInââfo.reason"]'), "$"))
print(elm.text)
</code></pre>

python angularjs selenium selenium-webdriver automated-tests