Honestly, your XPath hack isn’t *that* bad. But yeah, `:last-child` is cleaner.
If the list’s super dynamic, maybe even check for `li` count first with `len(driver.find_elements_by_css_selector("ul li"))` to be safe.
If the list’s super dynamic, maybe even check for `li` count first with `len(driver.find_elements_by_css_selector("ul li"))` to be safe.
