Drop down box selection(Select)

http://www.cnblogs.com/yoyoketang/p/6128636.html

from selenium.webdriver.support.select import Select
Month=driver.find_element_by_id("input-creditCardExpirationMonth")
Select(Month).select_by_value("05")
Year=driver.find_element_by_id("input-creditCardExpirationYear")
Select(Year).select_by_value("2018")
Country=driver.find_element_by_id("input-creditCardCountry") 
Select(Country).select_by_index(4)
原文地址:https://www.cnblogs.com/Lina-zhu/p/6826316.html