selenium自学笔记---下拉框定位元素select

it2022-05-05  94

下拉框1.先定位select 然后在定位option city = driver.find_element_by_id("selCities_0") city.find_element_by_xpath("//option[@value='50']").click() 或者 driver.find_element_by_id("selCities_0").find_element_by_xpath("//option[@value='50']").click()2.通过xpath层级标签定位 driver.find_element_by_xpath("//select[@id='selCities_0']/option[3]")

 

转载于:https://www.cnblogs.com/fbug/p/6128550.html


最新回复(0)