<span id="app_status_health">
<span class="status_indicator yellow" id="ext-gen10267"></span>
</span>
I wanted to know if its possible to get the class name "status_indicator yellow" and store it in a variable.
<span id="app_status_health">
<span class="status_indicator yellow" id="ext-gen10267"></span>
</span>
I wanted to know if its possible to get the class name "status_indicator yellow" and store it in a variable.
Try the following code:
class_name = driver.find_element_by_css_selector("#app_status_health>span").get_attribute("class")
Hope it helps you!