Webdriver的下拉框选择

时间:2014-01-16 21:04:22   收藏:0   阅读:370

1、select类型的:

    m=browser.find_element_by_id("clientId")
    m.find_elements_by_tag_name("option")[1].click()

2、Select

select=driver.find_element_by_xpath("//select[@id=‘clientId]")
select.find_element_by_xpath("//option[@value=‘Family Dollar‘]").click()

原文:http://www.cnblogs.com/tyen0921/p/3519022.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!