本文整理汇总了Python中selenium.webdriver.support.select.Select.send_keys方法的典型用法代码示例。如果您正苦于以下问题:Python Select.send_keys方法的具体用法?Python Select.send_keys怎么用?Python Select.send_keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类selenium.webdriver.support.select.Select
的用法示例。
在下文中一共展示了Select.send_keys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: distro_tree_advance_search_process
# 需要导入模块: from selenium.webdriver.support.select import Select [as 别名]
# 或者: from selenium.webdriver.support.select.Select import send_keys [as 别名]
def distro_tree_advance_search_process(self,name,osmajor,arch="",variant=""):
driver=self.driver
driver.find_element_by_id("showadvancedsearch").click()
driver.implicitly_wait(2)
table=WebDriverSelect(driver.find_element_by_id("search_0_table"))
table.select_by_value("Name")
operation=WebDriverSelect(driver.find_element_by_id("search_0_operation"))
operation.select_by_value("contains")
value=driver.find_element_by_id("search_0_value")
value.send_keys(name)
driver.find_element_by_xpath("//a[@id='doclink']").click()
driver.implicitly_wait(4)
table=WebDriverSelect(driver.find_element_by_id("search_1_table"))
table.select_by_value("OSMajor")
operation=WebDriverSelect(driver.find_element_by_id("search_1_operation"))
operation.select_by_value("contains")
value=driver.find_element_by_id("search_1_value")
value.send_keys(osmajor)
i='2'
if arch != "" :
driver.find_element_by_xpath("//a[@id='doclink']").click()
driver.implicitly_wait(4)
table=WebDriverSelect(driver.find_element_by_id("search_"+i+"_table"))
table.select_by_value("Arch")
operation=WebDriverSelect(driver.find_element_by_id("search_"+i+"_operation"))
operation.select_by_value("is")
value=WebDriverSelect(driver.find_element_by_id("search_"+i+"_value"))
value.select_by_value("x86_64")
i='3'
if variant != "" :
driver.find_element_by_xpath("//a[@id='doclink']").click()
driver.implicitly_wait(4)
table=WebDriverSelect(driver.find_element_by_id("search_"+i+"_table"))
table.select_by_value("Variant")
operation=WebDriverSelect(driver.find_element_by_id("search_"+i+"_operation"))
operation.select_by_value("contains")
value=driver.find_element_by_id("search_"+i+"_value")
value.send_keys(variant)