I am trying to find all elements of a certain kind on a webpage with Selenium (python). For simplicity, let's say their id is elem_id
. I am using the following code snippet to do so:
all_elements = driver.find_elements_by_id("elem_id")
print(str(len(all_elements)))
I know that there are ~3000 of this kind of element on the webpage in question, but whenever I print the length of all_elements
, it always prints 1000
.
It definitely finds the right kind of element (I checked), but somehow it doesn't find all of them at once. It also selects the 1000 elements at random, meaning that it neither picks the first 1000 or the last 1000 exclusively. I tried finding out whether there's a cap on how many elements Selenium can find, but there doesn't appear to be a max amount of 1000.
Does anyone know why Selenium only finds 1000 elements at a time? What am I doing wrong? Thank you very much!