当前位置: 首页>>代码示例>>Python>>正文


Python Select.deselect_by_value方法代码示例

本文整理汇总了Python中selenium.webdriver.support.select.Select.deselect_by_value方法的典型用法代码示例。如果您正苦于以下问题:Python Select.deselect_by_value方法的具体用法?Python Select.deselect_by_value怎么用?Python Select.deselect_by_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在selenium.webdriver.support.select.Select的用法示例。


在下文中一共展示了Select.deselect_by_value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: remove_selection

# 需要导入模块: from selenium.webdriver.support.select import Select [as 别名]
# 或者: from selenium.webdriver.support.select.Select import deselect_by_value [as 别名]
 def remove_selection(self, locator, optionLocator):
     el = self.driver.find_element(self.getBy(selectLocator), self.getValue(selectLocator))
     select = Select(el)
     logging.debug(select.options)
     if "label=" in optionLocator:
         select.deselect_by_visible_text(optionLocator[6:])
     elif "value=" in optionLocator:
         select.deselect_by_value(optionLocator[6:])
开发者ID:caizhenxing,项目名称:Python-WebDriver-Backed-Selenium-RC,代码行数:10,代码来源:seleniumbacked.py

示例2: deselect_option

# 需要导入模块: from selenium.webdriver.support.select import Select [as 别名]
# 或者: from selenium.webdriver.support.select.Select import deselect_by_value [as 别名]
    def deselect_option(self, value=None, text=None, index=None):
        if len(list(filter(None, (value, text, index)))) != 1:
            raise ValueError("You must supply exactly one of (value, text, index) kwargs")

        select = Select(self)
        if value is not None:
            select.deselect_by_value(value)
        elif text is not None:
            select.deselect_by_visible_text(text)
        else:
            select.deselect_by_index(index)
开发者ID:wbrp,项目名称:webdriverplus,代码行数:13,代码来源:webelement.py

示例3: __delitem__

# 需要导入模块: from selenium.webdriver.support.select import Select [as 别名]
# 或者: from selenium.webdriver.support.select.Select import deselect_by_value [as 别名]
 def __delitem__(self, key):
     s = WebDriverSelect(self.driver.find_element_by_locator(self.locator))
     method = key[:key.find("=")]
     value = key[key.find("=") + 1:]
     if method == "value":
         s.deselect_by_value(value)
     elif method == "index":
         s.deselect_by_index(value)
     elif method == "text":
         s.deselect_by_visible_text(value)
     else:
         raise saunter.exceptions.InvalidLocatorString("%s is an invalid locator" % item)
开发者ID:Element-34,项目名称:py.saunter,代码行数:14,代码来源:multi_select.py


注:本文中的selenium.webdriver.support.select.Select.deselect_by_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。