How to get all texts of an element and store it into array/list?

Example: A <ul class > have 28 <li class>, each <li class> have a text, I want to get all texts of all <li class> and store into a array/list but I don't know how do it

7 Likes