As an exercise, I want to get the confirmed cases and the deaths value from this site (at the top left) via Selenium.
Ive tried it with xPath but it doesn't work! f.e.:
worldInfected = driver.find_element_by_xpath("//*[@id=\"ember584\"]/svg/g[2]/svg/text")
If I use this I get
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: /html/body/div/div/div[2]/div/div/div/margin-container/full-container/div[2]/margin-container/full-container/div/div/div/div[1]/svg/g[2]/svg/text
but I copied the path from the website so shouldn't it give me the text
I've tried it with the same strategy on other websites and it worked.. Does it have something to do with this exact website and if so is there another way to crawl this information?
Thank you for helping me in advance! <3