I want to go through a dictionary that has lists within
Lista = {'829690':['testmartin','--test$2--']}
I need that in my function For key in
... read me testmartin
and --test$2--
Here is everything I have to do with the key0 and I need the same thing to be repeated for each key in the dictionary:
for lista in Lista.itervalues():
for value in lista:
nombre.send_keys(value)
try:
element_present = EC.presence_of_element_located((By.CSS_SELECTOR, '.select2-results-dept-0'))
WebDriverWait(driver, timeout).until(element_present)
except TimeoutException:
print ("Timed out waiting for page to load")
nombre2 = driver.find_element_by_css_selector('.select2-results-dept-0').click()
driver.find_element_by_css_selector('button.btn-success:nth-child(3)').click()
try:
element_present = EC.presence_of_element_located((By.CSS_SELECTOR, "div.modal-footer:nth-child(3) > button:nth-child(1)"))
WebDriverWait(driver, timeout).until(element_present)
except TimeoutException:
print ("Timed out waiting for page to load")
driver.find_element_by_css_selector('div.modal-footer:nth-child(3) > button:nth-child(1)').click()