【发布时间】:2022-01-03 07:55:31
【问题描述】:
我想在 selenium 中的一个元素上单击 5 次我如何在 python 中使用 for 循环或 while 循环来做到这一点 我试过在python中使用for循环下面是代码
nextButton = driver.find_element_by_id("com.sustlabs.ohmassistant:id/btn_next")
for nextButton in range(5):
nextButton.click()
【问题讨论】:
-
您看到任何错误吗?使用 下一步 按钮的相关 HTML 更新问题。
标签: python selenium for-loop while-loop