I'm using Selenium WebDriver using Python for UI tests and I want to check the following HTML:
<ul id="myId">
<li>Something here</li>
<li>And here</li>
<li>Even more here</li>
</ul>
From this unordered list I want to loop over the elements and check the text in them. I selected the ul-element by its id
, but I can't find any way to loop over the <li>
-children in Selenium.
Does anybody know how you can loop over the <li>
-childeren of an unordered list with Selenium (in Python)?