How would I go about running a loop as long as a specific div-element is present on a website?
I need the parser to go through a number of pages and click next for each page - the last page is empty and thus lacks the aforementioned div-element, so I figured running this within a while-loop would be a good approach. I'm however not sure how I should make this properly.
What I currently have, though non-functioning, is:
test = driver.find_element_by_class_name("divClassName").size()
, and subsequently checking whether its size is while(test != 0).
Any suggestions would be much appreciated!
while true: if not test: break