Reputation: 17
trying to add multiple values one below the other using python on a webpage my code
a= [820,827,826,637,865]
element = driver.find_element_by_id("ctl00_ctl00_ContentPlaceHolderContent_MainCategoriserContent_Map1_SubgroupsAndProducts1_txtProductSearch").send_keys('{}'.format(a))
but while entering the above in the below input on a webpage I want to enter it one below the other like this with a leading 0
0820
0827
0826
0637
0865
the final entry should look like this in the webpage enter image description here
Upvotes: 0
Views: 54
Reputation: 1957
use this code
a= [820,827,826,637,865]
for each in a:
element = driver.find_element_by_id("ctl00_ctl00_ContentPlaceHolderContent_MainCategoriserContent_Map1_SubgroupsAndProducts1_txtProductSearch").send_keys('{}'.format("0"+str(each)))
Upvotes: 1