I am aware that there already exists similar threads about this. However, when trying previously suggested methods to retrieve my specific dynamic table value, all I am getting is either a nbsp value or something cryptic like "1a207feb-8080-4ff0-..."
What I am trying to do:
Get the current table value for euro/oz value for gold from here. I "inspected" the page and got the xpath (//*[@id="bullionPriceTable"]/div/table/tbody/tr[3]/td[3]/span)
My code:
driver = webdriver.Chrome("path/to/chromedriver")
driver.get("https://www.bullionvault.com/gold-price-chart.do")
xpath = '//*[@id="bullionPriceTable"]/div/table/tbody/tr[3]/td[3]/span'
select=driver.find_element_by_xpath(xpath)
print(select)
This prints:
<selenium.webdriver.remote.webelement.WebElement (session="3ade114e9f0907e4eb13deac6a264fc8", element="3a670af5-8594-4504-908a-a9bfcbac7342")>
which obviously is not the number I was looking for.
I've also experimented with using get_attribute('innerHtml') and .text on the webElement, but to no avail. What am I missing here? Am I just not encoding this value correctly, or am I extracting from the wrong source?