标签:doc bsp text xpath time color ext 通过 选择
select_ele = driver.find_element_by_xpath("//select[@name=‘gpc‘]") select = Select(select_ele) time.sleep(1) # 方式一:通过索引进行选择 select.select_by_index(3) # 方式二:通过文本进行选择 select.select_by_visible_text(‘最近一年‘) # 方式三:通过value进行选择 s2 = Select(driver.find_element_by_xpath("//select[@name=‘ft‘]")) s2.select_by_value(‘doc‘)
标签:doc bsp text xpath time color ext 通过 选择
原文地址:https://www.cnblogs.com/erchun/p/12906666.html