企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[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 值是字符串, 整数会报错 ```