web 选择下拉框 select -> option

<select>
<option1>1</option>
<option1>2</option>
<option1>3</option>
<option1>4</option>
</select>
python 实现选择的代码
例如选择选项“1”
from selenium.webdriver.support.ui import Select

select = Select(driver.find_element_by_tag_name("select"))
select.select_by_visible_text(“1”)



猜你喜欢

转载自www.cnblogs.com/tianmaodou/p/9023237.html