How to get list of <li> elements in <ul> with Selenium using Python?
I am using Selenium WebDriver using Python tests for UI 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 iterate over the elements and check the text in them. I chose ul-element as my id , but I cannot find any way to loop over <li> -children in Selenium.
Does anyone know how you can scroll through an <li> -childeren unordered list with Selenium (in Python)?
+6
2 answers