I'm trying to get the span text for fourth class
from the following html base for a specific nth iteration of that class in the html base.
<ul class="first_class">
<li class="second_class ">
<span class="third_class">
<span class="fourth_class">100</span>
" temp_x"</span>
</li>
<li class="second_class ">
<span class="third_class">
<span class="fourth_class" title="200">200</span>
" temp_y"</span>
</li>
<li class="second_class ">
<span class="third_class">
<span class="fourth_class">300</span>
" temp_z"</span>
</li>
</ul>
I was wondering if there is a way to specifically grab the 2nd and 3rd iteration so the output is 200
and 300
I'm only able to retrieve 100
which is from the first iteration using this:
self.driver.find_element_by_xpath("//span[@class='fourth class']").text