标签: javascript python selenium
我无法在selenium execute脚本方法内传递python变量。我的示例代码是:
for i in range(1,6): element = driver.execute_script("return $('.Pagination__block___12xKp')[i]") element.click()
我收到一个错误i is not defined。我该如何解决?
i is not defined