all_divs contain all the links i got . I need to click all of them but when i try to do , selenum throws stale error saying
"selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed "
link_div = driver.find_elements_by_css_selector("div[id='sidebar1269']")[0]
all_divs = link_div.find_elements_by_css_selector("div>a:last-of-type")
print(all_divs[0])
for i in all_divs:
i.click()