I want to get the values contained in the span class with value "indigo-text descfont" for the following:
<div id="WineDetailContent"> event
<span class="blue-text codefont">...</span>
<span class="indigo-text descfont">Alsace</span>
<br>
<span class="blue-text codefont">...</span>
<span class="indigo-text descfont">2014</span>
<br>
</div>
So that I get Alsace and 2014. I have tried using the following:
details = driver.find_element_by_xpath("//div[starts-with(@id,'WineDetailContent')]")
res = details.find_element_by_xpath("//span[starts-with(@class,'indigo-text descfont')]")
print(res.text)
But it only returns the first needed value, i.e. Alsace. How is it possible to get 2014 as well?