[英]Python Selenium - Clicking pages without next button
i=2
While True:
try:
#some wait
driver.find_element_by_xpath("//a[@class='btn btn-primary spacebutton' and .='{}']".format(str(i+1))).click()
i++
except:
break
只需遍历 a 标签并根据其文本单击它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.