I am trying to get this number (-22.65) that changes in the website Page code
I have tried with the xpath, with contain text...
text = driver.find_element_by_xpath("//*[contains(text(),'valueValue-2KhwsEwE')]").text
print(text)
But in any case I get the number itself... I get the following message:
File "C:\Users\ESJOMAN2.spyder-py3\temp.py", line 22, in
text = driver.find_element_by_xpath("//*[contains(text(),'valueValue-2KhwsEwE')]").textFile "C:\Users\ESJOMAN2\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)File "C:\Users\ESJOMAN2\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {File "C:\Users\ESJOMAN2\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)File "C:\Users\ESJOMAN2\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)NoSuchElementException: no such element: Unable to locate element:
{"method":"xpath","selector":"//*[contains(text(),'valueValue-2KhwsEwE')]"}
(Session info: chrome=89.0.4389.90)
Any ideas?