Hi I am trying to use selenium to select an item from a dropdown using the actual text not the value option. My script pulls states out of a list and iterates through the states selecting the dropdown that matches the list. When I try the following code it throws out an error:
for agentinfo1, agentstate1 in zip(agentinfo, agentstate):
select2 = driver.find_element_by_css_selector("#selst" %agentstate1)
select2.click()
select2 = driver.find_element_by_css_selector("#selst" %agentstate1) TypeError: not all arguments converted during string formatting
I'm wondering if the error is thrown out becuase when I grab the data that I put in my list I append a "\n" but even when I take out that code it does not work.