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. PenetrationTest

    一.渗透测试是什么 渗透测试(PenetrationTest)是对安全情况最客观.最直接的评估方式,主要是模拟黑客的攻击方法对系统和网络进行非破坏性质的攻击性测试,在保证整个渗透测试过程都在可以控制和 ...

  2. sqlite3加密支持

    sqlite3加密支持 sqlite3免费版并不支持加密,不过留有接口,有不少开源的加密实现,不过有的需要使用openssl配置略显繁琐,不过使用wxsqlite比较方便. wxSqlite3 wxS ...

  3. 15_采用Pull解析器解析和生成XML内容

    java还提供SAX和DOM用于解析XML Android还集成了Pull解析器——推荐 package cn.itcast.service; import java.io.InputStream; ...

  4. <转Tanky Woo> 字典树

    又称单词查找树,Trie树,是一种树形结构,是一种哈希树的变种.典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计.它的优点是:利用字符串的公共前缀 ...

  5. 别在细节上栽跟头------------mysql 字段类型详解

    也许你平时不在意,在设计数据库的时候,数字就设成int(10) 字符串就设成varchar(20)或者text 普通情况下是没有问题的,但是若不理解字段类型和长度的含义,总有一天你会在这里栽跟头, 这 ...

  6. 在linux系统下检查postgresql数据库安装,登录数据库及简单的查看数据库

    1.    检查Linux系统是否安装数据库 首先查看自己的系统是否安装了postgresql数据库命令如下: rpm -qa | grep postgresql 如果没有显示查询结果(如下图所示)说 ...

  7. Linux同步机制(一) - 线程锁

    1 互斥锁 在线程实际运行过程中,我们经常需要多个线程保持同步. 这时可以用互斥锁来完成任务.互斥锁的使用过程中,主要有 pthread_mutex_init pthread_mutex_destor ...

  8. 网络攻击之二:XSS(之一是SQL注入,前面有文章)

    学习了 http://www.oschina.net/question/565065_57506 (这里做了转载 http://blog.csdn.net/stilling2006/article/d ...

  9. 用FireMonkey写QQ皮肤

    这是运行在Windows平台的效果,同样不需要改一行代码就可以运行在Mac Os,并且效果完全相同: 用FireMonkey做界面速度非常快,其提供的Effect ,Filter,Animation等 ...

  10. Javascript零散知识点总结

    一.Javascript获取系统当前时间 <script type="text/javascript"> var time = new Date(); var date ...