I'm trying to loop back my list of li
in selenium and it's not rolling. I already tried a reversed
in the list but the error.
I want to loop the last li
to the first one.
For example, in the list below:
<ul id="lista">
<li>Eu nao</li>
<li>Consigo</li>
<li>Comecar de baixo pra cima</li>
</ul>
I would like the result to be from the bottom up. The output would have to be this way:
Comecar de baixo pra cima
Consigo
Eu nao
Note: I can not loop first on the transforming elements in the list and then do the reversed. For in my real case, the li list is approximately 5000 items. But the most current ones are always the last ones, so it does not roll to make a looping in 5000 items, turning them into a list and then in a second looping to pick up the last.