Oct-07-2017, 06:31 AM
(This post was last modified: Oct-07-2017, 06:32 AM by digitalmatic7.)
I wanted to have a variable (random number between 1 and 12) used for my drop down option value..
So instead of value='05' it would be something like value='month', value='day'
Unfortunately it doesn't work. What are my options?
So instead of value='05' it would be something like value='month', value='day'
Unfortunately it doesn't work. What are my options?
driver.find_element_by_xpath("//SELECT[@name='month']/option[@value='05']").click() driver.find_element_by_xpath("//SELECT[@name='day']/option[@value='01']").click()PS - the numbers must be formatted like 01, 02, 03, 04, 05, 06 etc rather than 1, 2, 3, 4, 5