I have been unable to get the rating number from the website https://www.hoka.com/en/us/mens-everyday-running-shoes/rincon-3/1119395.html using selenium.
This is what I have as Python code:
from selenium import webdriver
from selenium.webdriver.common.by import By
url = "https://www.hoka.com/en/us/mens-everyday-running-shoes/rincon-3/1119395.html"
driver = webdriver.Chrome()
driver.get(url)
res = driver.find_elements(By.TAG_NAME, 'h3')
for i in res:
print(i.text)
I am getting empty result.
Here's the line with the info I want to extract:

To print the text 4.4 ideally you need to induce WebDriverWait for the presence_of_element_located() and you can use either of the following locator strategies:
Using CSS_SELECTOR and text attribute:
Using XPATH and
get_attribute():Console Output:
Note : You have to add the following imports :