How to use Selenium to find the last li in ul? or What's the best way to find the last li in ul using

16 Replies, 1491 Views

If you’re stuck on selenium find last li in ul, check out the `:-soup-selector` in BeautifulSoup if you’re parsing static HTML.

But for Selenium, stick with `:last-child` or XPath `last()`.

Also, Chrome DevTools can help verify your selectors before coding.

Messages In This Thread



Users browsing this thread: 2 Guest(s)