May-16-2020, 02:42 PM
Hello people, I dont know how to stop/pass this cycle while.
the situation is the next:
In one web page I need to click few times until reload the next page.
the problem is when go for the next webpage, i dont know why, but the python dont go out from the cycle while, and of course he can´t find the "find_element_by_xpath(f[i])" and have a error in "element1=driver.find_element_by_xpath(f[i])" because I can´t find the xpath
the situation is the next:
In one web page I need to click few times until reload the next page.
the problem is when go for the next webpage, i dont know why, but the python dont go out from the cycle while, and of course he can´t find the "find_element_by_xpath(f[i])" and have a error in "element1=driver.find_element_by_xpath(f[i])" because I can´t find the xpath
while True :
try:
element1=driver.find_element_by_xpath(f[i])
driver.find_element_by_xpath(f[i]).click()
import time
time.sleep(1)
except ValueError:
print("no more clicks")
pass
