下拉详情 <select name="fromMonth"> <option value="1">January </option><option value="2">February </option><option value="3">March </option><option value="4">April </option><option value="5">May </option><option value="6">June </option><option value="7">July </option><option value="8">August </option><option selected="" value="9">September </option><option value="10">October </option><option value="11">November </option><option value="12">December </option></select>我想打印一月二月等等...
3 回答
ITMISS
TA贡献1871条经验 获得超8个赞
根据 HTML 打印下拉列表中存在的月份列表,您可以使用以下解决方案:
selectmonth = Select(driver.find_element_by_name('fromMonth'))
for option in selectmonth.options:
print(option.text)
添加回答
举报
0/150
提交
取消