How can i reach all li with for loop in python. You can see the codes below :
<ul class="example">
<li class="example-li"></li>
<li class="example-li"></li>
<li class="example-li"></li>
</ul>
results = self.driver.find_elements_by_xpath(
"//ul[@class='example']"
)
for result in results:
hover = ActionChains(self.driver).move_to_element(result)
hover.perform()
print(len(results)) # expected to print '3'