Apr-02-2020, 08:06 AM
Hello guys, I dont know why but sometimes the click() do not work
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
He find the f[i], and looks he is bypssing the
driver.find_element_by_xpath(f[4]).click()
because the error is in
driver.wait.until(EC.presence_of_element_located((By.XPATH,"xpath4")))
and of course he eill not find the xpath4 because he dont open the element f[4].
You now why he is bypassing, or another way more efficient to open a element?
a=11 def my_function(i,driver): while i<a: element=driver.wait.until(EC.presence_of_element_located((By.XPATH,f[i]))) driver.find_element_by_xpath(f[i]).click() --->driver.wait.until(EC.presence_of_element_located((By.XPATH,"xpath4"))) driver.find_element_by_xpath("xpath4").click() import time time.sleep(2) driver.back() i=i+1 import time time.sleep(3) pass passThe loop, number 1,2,3 is good, and in the 4 have a error, it say:
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
He find the f[i], and looks he is bypssing the
driver.find_element_by_xpath(f[4]).click()
because the error is in
driver.wait.until(EC.presence_of_element_located((By.XPATH,"xpath4")))
and of course he eill not find the xpath4 because he dont open the element f[4].
You now why he is bypassing, or another way more efficient to open a element?