I have some problems with Selenium where I am trying to find all elements and then try to use WebDriverWait:
WebDriverWait(browser, 5).until(
EC.presence_of_element_located((By.XPATH,
"//*[contains(text(), 'Hello')]")))
getAllErrors = WebDriverWait(browser, 5).until(
EC.presence_of_all_elements_located((By.CLASS_NAME, "message")))
for productErrors in getAllErrors:
if 'Sad moments' in productErrors.text:
totalProduct = WebDriverWait(browser, 5).until(
EC.presence_of_element_located((productErrors.find_element_by_xpath("//input[@type='number']"))))
#How to call productErrors and to use WebDriverWait with it?
I wonder how to use the for loop data and use WebDriverWait with the for loop varaiable?
Basically something like
for productErrors in getAllErrors:
WebDriverWait(browser, 5).until(EC.presence_of_element_located((productErrors.find_element_by_xpath("//input[@type='number']"))))
#Use productErrors For loop and find the xpath from productErrors