Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99018

How to get value of content attribute from span class

$
0
0

My diction is going to be wrong, so forgive the misnomers. I'm looking for the text of the "content" within the span class:

<span class="rating-label" content="5">

I'm looking for "5"

I've tried

driver.find_element_by_class_name('rating-label').text

But I do not receive the "5" back anywhere in that text.

I've also tried

driver.find_elements_by_class_name('rating-label').get_attribute("outerHTML")
driver.find_elements_by_class_name('rating-label').get_attribute("innerHTML")

I've checked the other questions about this, but if I missed one feel free to show me.

Thanks


Viewing all articles
Browse latest Browse all 99018

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>