I am writing a small visual parser through selenium in Python. My program enters the site, authorizes, reads the block I need, analyzes, goes further. It happens like this
while i<25: s1 = '(//span[@class="wo-subject"])[' s2 = ']' i = str(i) s = s1+i+s2 name = driver.find_element_by_xpath(s).text ... i = int(i) i = i+1 Such blocks are not really 25, but how to first find out how many elements in my xpath condition I didn’t guess and I can’t find. Therefore, I ask for your help. How can I find out how many elements per page fit my condition?