I don't know if this is often asked but I just can't figure out how to get the text info of an span bracket in the html code using python with selenium.
For example following code:
<li class="addetailslist--detail">
area
<span class="addetailslist--detail--value">
72,05 m²
</span>
</li>
<li class="addetailslist--detail">
rooms
<span class="addetailslist--detail--value">
2,5
</span>
</li>
Since I have multiple elements of "addetailslist--detail" on the page, I want to address them by using the words "area" or "rooms". Then I want to get the specific text from the class "addetailslist--detail--value" (e.g. 72,05m² and 2,5). I just can't figure out, how to address them the proper way. Can someone quickly help me on that one?
This is how far I have come:
area = self.browser.find_element_by_xpath("//*[contains(text(), 'area')]")
But this just delievers the whole element...