I am trying to get the text in the title on this page :

iShares FTSE MIB UCITS ETF EUR (Dist.)
The tag looks like this:
<h1 class="product-title" title="iShares FTSE MIB UCITS ETF EUR (Dist)"> iShares FTSE MIB UCITS ETF EUR (Dist) </h1>
I am using this xPath:
xp_name = ".//*[@class[contains(normalize-space(.), 'product-title')]]"
Getting through .textin Selenium WebDriver for Python:
new_name = driver.find_element_by_xpath(xp_name).text
The driver finds xpath, but when I type new_name, the MacOS terminal only prints an empty line:""
What could be the reason for this?

Note: I also tried some other xpath alternatives, getting the same result, for example with:
xp_name = ".//*[@id='fundHeader']//h1"
source
share