如果判斷 checkbox 並自動打勾。
You have only one checkbox with such ID (poi-legend-facility).
You can do like this:
checkbox = driver.find_element_by_id("poi-legend-facility")
if not checkbox.is_selected():
checkbox.click()
Or in your case try this code:
checkboxes = driver.find_elements_by_id("poi-legend-facility")
checkboxes[0].click()
PS: Using ID for finding element faster than finding by XPath.