下拉框选择
最后更新于:2022-04-02 03:42:53
[TOC]
## 概述
Select类来处理下拉框
```
from selenium.webdriver.support.select import Select
...
se = driver.find_element_by_css_selector("#user_sex")
Select(se).select_by_visible_text("男")
sleep(1)
Select(se).select_by_index(2)
sleep(1)
Select(se).select_by_value("1") # value 值是字符串, 整数会报错
```
';