In my Perl script, I have multiple lists of links that can collapse and expand. To determine the total number of links in a list, I am using the get_xpath_count('//li/a')
function.
The challenge I am facing is how to extract the actual names of these links. I have attempted to use xpath with limited success and decided to explore the option of CSS selectors. My attempt at using
get_text('css=li a:nth-child('.$i.')')
resulted in displaying a [-] icon next to the top link followed by an out-of-range error. Since I lack familiarity with CSS selectors, I am hoping someone can provide guidance on how to achieve this. Feel free to ask for any additional information if needed.