Reputation: 19
please help me to find the solution to get the information from this html code by using Selenium without XPath because I want to make a loop from it.
I want to get the result as: "4.7" from this "title="4.7/5 - 10378 Reviews"
please check the picture below:
Upvotes: 0
Views: 85
Reputation: 308
If you have driver
setup already,
Than try something like this,
rating = driver.find_element_by_class_name("stars").get_attribute("title")
print (rating)
Upvotes: 1