Drop down box selection(Select)

宣熙云
2023-12-01

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

 类似资料: