I'm trying to get image links from my website, it has around 40 images and I'm using driver.find_elements_by_css_selector
to get all the images to a list.
When I loop through this list and print id of these images, for the first 15 images it's working fine everything after that it throwing StaleElementReferenceException
I'm using WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.ID, 'image-list')))
for loading my image gallery.
How I can fix this StaleElementReferenceException
Thanks.