def unselect_from_list_by_index(self, locator, *indexes):
"""Unselects `*indexes` from list identified by `locator` Select list keywords work on both lists and combo boxes. Key attributes for
select lists are `id` and `name`. See `introduction` for details about
locating elements.
"""
if not indexes:
raise ValueError("No index given.") items_str = "index(es) '%s'" % ", ".join(indexes)
self._info("Unselecting %s from list '%s'." % (items_str, locator)) select = self._get_select_list(locator)
if not select.is_multiple:
raise RuntimeError("Keyword 'Unselect from list' works only for multiselect lists.") for index in indexes:
select.deselect_by_index(int(index))

方法名:unselect_from_list_by_index(self, locator, *indexes)

相似方法:

公共方法 移除所给indexes的选中状态

接收参数:locator,indexes

14行:使用_get_select_list(self, locator)方法,返回Select对象

Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)的更多相关文章

  1. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)

    def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...

  2. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)

    def unselect_from_list_by_value(self, locator, *values): """Unselects `*values` from ...

  3. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list(self, locator, *items)

    def unselect_from_list(self, locator, *items): """Unselects given values from select ...

  4. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)

    def select_from_list_by_label(self, locator, *labels): """Selects `*labels` from list ...

  5. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)

    def select_from_list_by_value(self, locator, *values): """Selects `*values` from list ...

  6. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list(self, locator, *items)

    def select_from_list(self, locator, *items): """Selects `*items` from list identified ...

  7. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)

    def list_should_have_no_selections(self, locator): """Verifies select list identified ...

  8. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_selection_should_be(self, locator, *items)

    def list_selection_should_be(self, locator, *items): """Verifies the selection of sel ...

  9. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)

    def get_selected_list_values(self, locator): """Returns the values of selected elemen ...

随机推荐

  1. Tomcat常见内存溢出的解决办法

    PermGen space错误解决方法 在看下文之前,首先要确认意见事情,就是你是如何启动tomcat的,我们在平时的开发环境当中,都是通过startup.bat方式启动tomcat的,那么你按照下面 ...

  2. RHEL7服务管理

    对于学习过红帽RHEL6的系统或已经习惯使用service.chkconfig等命令来管理系统服务的用户可能要郁闷了, 因为在红帽RHEL7系统中管理服务的命令变成了“systemctl”,但使用方法 ...

  3. 唯一区别是不会去取emptyText 的值,没有选选择选项的时候返回是空字符串

    combox取值以及赋值的方法 function getValue() { //注意:以下这两种取值方法都会存在一个问题: 当combox设置成能输入并有只能提示的时候,当输入的不是备选项时,或到的v ...

  4. 《mysql悲观锁总结和实践》-悲观锁

    最近学习了一下数据库的悲观锁和乐观锁,根据自己的理解和网上参考资料总结如下: 悲观锁介绍(百科): 悲观锁,正如其名,它指的是对数据被外界(包括本系统当前的其他事务,以及来自外部系统的事务处理)修改持 ...

  5. Data Flow ->> Term Extraction

    中文意思是关键词抽取,用于计算在文本中哪些词汇或者词组出现的频率最高.其实算法有两张:1)Frequency 2)TFIDF TFIDF的全称是Term Frequency and Inverse D ...

  6. LinuxMint使用中文输入法

    自从转战linux系统以来,最痛苦的事情就是没有一款能让我满意的中文输入法了 不过今天我终于发现了一个让我比较满意的输入法(小小输入法),真的很不错 我试过不少输入法,但是还是小小输入法最适合我: 搜 ...

  7. 卷积神经网络(CNN)

    1. 概述 卷积神经网络是一种特殊的深层的神经网络模型,它的特殊性体现在两个方面,一方面它的神经元间的连接是非全连接的, 另一方面同一层中某些神经元之间的连接的权重是共享的(即相同的).它的非全连接和 ...

  8. github简单使用教程(转)

    github是一个基于git的代码托管平台,付费用户可以建私人仓库,我们一般的免费用户只能使用公共仓库,也就是代码要公开.对于一般人来说公共仓库就已经足够了,而且我们也没多少代码来管理,O(∩_∩)O ...

  9. SNMP SNMP协议

    SNMP协议 一.什么是SNMP? SNMP是简单网络管理协议[Simple Network Management Protocol],由一组网络管理的标准组成,包含一个应用层协议(applicati ...

  10. Pycharm连接gitlab

    一.从gitlab上clone代码到本地pycharm (一).gitlab上找到创建项目的连接地址,分两种: 1. http连接方式: http://10.22.1.72/derekchen/cxg ...