I have some HTML that I am using selenium to scrape, I want to scrape the text inside the small tags. I cannot use XPath as for other examples, the XPath changes. This is the HTML:
<h3 class="price">
$28.04
<small>ex</small><br> <small>$30.84 <small>inc</small></small></h3>
I know you can use price = driver.find_elements_by_class_name("price")
and using price[1].text
to get the text but I end up getting a selenium webdriver element:
<selenium.webdriver.remote.webelement.WebElement (session="a95cede569123a83f5b043cd5e138c7c", element="a3cabc71-e3cf-4faa-8281-875f9e47d6a4")>
Is there a way to scrape the 30.84 text?