I am trying to web-scrape the chart data from this page https://www.focusireland.ie/resource-hub/latest-figures-homelessness-ireland/
On the right top, there is a chart which details Number of homeless people in Ireland.
I am trying to web-scrape the axis which is Jul - 14 and it's corresponding value 3258. But, I couldn't do locate those element and it's value using x-path.
I tried something like this to web-scrape the value
Val1 = driver.find_element_by_xpath("//*[@id='chart']/div[7]").text
& it didn't work.
And tried this:-
element_to_hover_over = driver.find_element_by_xpath("//div[@class='label series smaller' | @class='label series smaller hover']/span[text()='Jul-14'").text
print(element_to_hover_over)
It didn't work either for me and returned an error message as
Unable to locate an element with the xpath expression //div[@class='label series smaller' | @class='label series smaller hover']/span[text()='Jul-14' because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//div[@class='label series smaller' | @class='label series smaller hover']/span[text()='Jul-14'' is not a valid XPath expression.